Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to guarantee azure queue FIFO

I understand that MS Azure Queue service document http://msdn.microsoft.com/en-us/library/windowsazure/dd179363.aspx says first out (FIFO) behavior is not guaranteed.

However, our application is such that ALL the messages have to be read and processed in FIFO order. Could anyone please suggest how to achieve a guaranteed FIFO using Azure Queue Service?

Thank you.

like image 617
Nil Pun Avatar asked Sep 15 '11 11:09

Nil Pun


2 Answers

The docs say for Azure Storage queues that:

Messages in Storage queues are typically first-in-first-out, but sometimes they can be out of order; for example, when a message's visibility timeout duration expires (for example, as a result of a client application crashing during processing). When the visibility timeout expires, the message becomes visible again on the queue for another worker to dequeue it. At that point, the newly visible message might be placed in the queue (to be dequeued again) after a message that was originally enqueued after it.

Maybe that is good enough for you? Else use Service bus.

like image 180
Renaud Avatar answered Sep 20 '22 06:09

Renaud


The latest Service Bus release offers reliable messaging queuing: Queues, topics and subscriptions

like image 40
RichBower Avatar answered Sep 23 '22 06:09

RichBower