[rabbitmq-discuss] keep unacked message at the head of queue
alex chen
chen650 at yahoo.com
Tue Jan 26 08:31:08 GMT 2010
Thanks Matthias for the quick response! Our application processes time series data so it is crucial to keep the message order. It has one exclusive consumer only. It would be really nice if rabbitmq could send the unacked messages first for this use case.
-alex
----- Original Message ----
From: Matthias Radestock <matthias at lshift.net>
To: alex chen <chen650 at yahoo.com>
Cc: rabbitmq-discuss at lists.rabbitmq.com
Sent: Mon, January 25, 2010 11:23:23 PM
Subject: Re: [rabbitmq-discuss] keep unacked message at the head of queue
Alex,
alex chen wrote:
> Currently rabbitmq re-queues the unacked messages to the end of
> queue. Is it possible to keep those messages at the head of queue
> instead?
No, that isn't possible.
> Our application needs to keep the ordering of the messages.
The ordering guarantees provided by AMQP are very constrained. See section 4.7 of the AMQP 0-9-1 spec which, for example, states that all bets are off when messages get redelivered.
There are good reasons for being so restrictive: excessive ordering guarantees are bad for scalability. Also, it is actually logically impossible to maintain message order in all but the simplest scenarios. For example, even just adding a second consumer to a queue necessarily breaks the order of redeliveries wrt other messages.
Regards,
Matthias.
More information about the rabbitmq-discuss
mailing list