[rabbitmq-discuss] Recycling messages that have been consumed but not acked

Matthias Radestock matthias at rabbitmq.com
Fri Sep 2 10:41:13 BST 2011


On 02/09/11 10:34, Marek Majkowski wrote:
> On Thu, Sep 1, 2011 at 06:30, Dmitry Demeshchuk<demeshchuk at gmail.com>  wrote:
>> Looks like basic.recover is what I want, right?
>
> Yes, looks like it:
> http://www.rabbitmq.com/amqp-0-9-1-quickref.html#basic.recover

Note however ...

>>> So, my question is, is there a way to make all unacked messages in a
>>> queue become ready for consumption again?

basic.recover acts on the *channel*, not the queue, i.e. it will cause 
all messages delivered on the specific channel to be redelivered/requeued.

Also, the client owning the channel must not subsequently ack any of the 
messages that were recovered, or the broker will complain. That's why 
there is a synchronous version of 'basic.recover' since otherwise the 
client has no idea which messages were recovered, namely all messages 
received before the basic.recover-ok.


Matthias.


More information about the rabbitmq-discuss mailing list