[rabbitmq-discuss] Guaranteeing order of messages consumed from queue

Neil Kodner nkodner at gmail.com
Mon May 14 19:42:12 BST 2012


I'm using RabbitMQ 2.6.1 and Pika .95 with a single producer process and a
single consumer process.

I have a business requirement to process messages in the exact order that
they were received. Fortunately, this is very low volume - maybe 1 message
every 10 or 15 minutes.

If consumer-side processing fails for any reason on the consumer end, I
need to resolve the issue and not consume any subsequent messages from the
queue until the original problem is fixed.

I'm noticing that if I don't acknowledge a message, that it goes back into
the queue but it seems to lose its place in line.

In case consumer-side processing fails, I could reject the message but then
when I get a new message from the queue, instead of re-retrieving the
failed message, I get the next one created.

In the real-world, I don't expect to have too many messages in my queue
unless it gets backed up due to failures.

I'm sure that I'm not the first person with this requirement-how do others
handle it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120514/e753eda0/attachment.htm>


More information about the rabbitmq-discuss mailing list