[rabbitmq-discuss] Queuing fundamentals.
emile at rabbitmq.com
Mon Aug 1 19:28:24 BST 2011
Op 01/08/11 18:49, het Andrew geskryf:
> Do you think that what I am trying to achieve should in theory work?
> If so, what should happen to message 3 after it's failed ACK? i.e.
> should my next request to the queue retrieve it, or will it always be
> delivered out of sequence after a failed ACK? If the latter is the
> case, how do I achieve ordered delivery of my messages even when my
> consume process dies and restarts?
Current versions of RabbitMQ requeue messages at the tail of the queue.
You can imagine requeue as a combination of acknowledgement and
publishing a fresh copy of the message.
In your example message 3 will go back to the tail of the queue and
subsequent messages (4 - 6) will be at the front of the queue and
maintain their relative order.
We are working on a feature that will allow the order of messages to be
preserved when messages are requeued to queues that have a single
consumer, so this may become available at a future date.
More information about the rabbitmq-discuss