[rabbitmq-discuss] How to handle poison messages (version 3.0.1)?

Matthias Radestock matthias at rabbitmq.com
Thu Jan 17 23:23:58 GMT 2013


On 17/01/13 22:49, Sandeep Aggarwal wrote:
> I'm using RabbitMQ version 3.0.1 and trying to handle the case with
> poison messages.

This does come up from time to time. And no, there is nothing built into 

> In our code here, if there is a problem with processing the message, we
> nack the message with redeliver flag set to true. However, this causes
> the message to go back in the queue and in turn the consumer reads the
> same message again (and again in a loop). This causes my consumer to
> crash or go fishing in a loop.

Instead of nack'ing the message the consumer could send it straight to 
the poison queue, and ack it to the main queue.

Though this doesn't work if the consumer simply dies when its eating the 
poison message.



More information about the rabbitmq-discuss mailing list