[rabbitmq-discuss] Redelivery of unacked messages.

Simon MacMullen simon at rabbitmq.com
Thu May 1 08:47:37 BST 2014


On 30/04/2014 22:02, Jochum, Jeffrey wrote:
> I have a queue that I am consuming many messages off of but I am not
> acking them immediately.  I wait a period and then ack them all at
> once.  However I notice I seem to be getting these messages again ever
> couple of minutes.  I don’t believe the publisher is republishing these
> messages, so I was wondering if the broker sends these out again, of if
> the messages go back to a recovery state at some point.

The messages will be returned to the main queue and eligible for 
redelivery if:

* The channel on which they were consumed closes (because you closed it 
explicitly or an error occured or the connection went down) OR

* You reject the messages with basic.reject / basic.nack OR

* You invoke basic.recover

There is no timeout or similar; messages can stay in the unacknowledged 
state forever as long as none of the above happens.

Cheers, Simon


More information about the rabbitmq-discuss mailing list