A delay queue is a queue in which each message has a delay time associated with it and a message can only be taken when its delay has expired. The head of the queue is that message whose delay expired furthest in the past. If no delay has expired there is no head and dequeue will return null.
Actually, I am writing a cloud application using Azure and in Azure only FIFO queues are available and not priority/delay queues. So I came here looking if someone can give me some pointers from where I can head start in the right direction. I googled a lot but only find out about the delay queues implementation in Java and no standard tutorial/research paper which talks about delay queues in general.
EDIT:
What I have code?
Actually, I have to first design this things and present it to my manager and once we finalize the design then only I can start coding.
More details about the scenario
Its a distributed application based on master/slave model. A master produce messages and put them into Azure Service Bus queues and there are multiple slaves (running on multiple machines) which read from queues and precess them. If in case a master goes down, then one of the slave acts as a master and starts producing messages. I don't want to store any state information in the master because in case master goes down all that state information will also goes with it.