[rabbitmq-discuss] Reordering on requeue

Matthias Radestock matthias at rabbitmq.com
Sun Jul 3 20:54:27 BST 2011


On 03/07/11 16:19, Jiri Krutil wrote:
> I would like to know if and when does rabbit change the order of
> messages on a queue in case of reject with requeue.
> Will a requeued message be pushed back onto the queue tail or will it
> stay at the head?

It will go to the tail. We are considering changing that behaviour for 
channel/connection closure and basic.recover{requeue=true}, but 
basic.reject/nack will likely stay as they are.

> What about messages consumed within a transaction that
> was rolled back?

Message consumption is not transactional. Acks are. When a transaction 
is rolled back all the acks submitted in it are forgotten, as if they 
had never happened. At that point the client still logically owns the 
messages - no message is requeued until it has been basic.reject/nack'ed 
or the consuming channel closes.


More information about the rabbitmq-discuss mailing list