[rabbitmq-discuss] Dead Lettering queries
emile at rabbitmq.com
Fri Apr 19 12:02:16 BST 2013
On 19/04/13 11:40, Kwstantinos Polydwrou wrote:
> So this would mean that I need a mechanism on my Consumer side
> (application B) which will do the following:
> - rejecting the message (based on some logic) and
> - setting the requeue flag to false.
If you want to make sure unacknowledged messages are not lost when
Application B crashes then you don't need to do that. Unacknowledged
messages are automatically requeued if the connection drops.
See the second tutorial (message acknowledgement):
If you want to dead-letter a message explicitly then you should set up a
dead-letter-exchange and have Application B reject the message with
requeue set to false. The Application cannot do this if it experienced a
NPE or any condition that causes the channel to close.
More information about the rabbitmq-discuss