[rabbitmq-discuss] Cleaning up unhandled messages
Peter Ledbrook
peter at cacoethes.co.uk
Fri Jan 21 17:48:53 GMT 2011
Hi,
What techniques do people use in dealing with messages that remain
unhandled on a queue, for example if no consumer can process them
successfully (perhaps because there's something wrong with the
message)?
The specific situation that this question derives from is this:
* A message causes an exception in the message handler;
* the message is hence not acked;
* the message never gets picked up again.
Now, the last item is really a result of a bug in the consumer, but
there is still a problem of messages that get left on the queue.
One suggestion that springs to mind is that the consumer should catch
the exception, ack the message and report it as bad in some way (if
that is in fact the case). I was also thinking of having a scavenger
consumer that deals with messages that get left like this, but that
would probably pick up messages that should be processed by the normal
consumer (and won't cause an exception).
Anyone have any other ideas?
Thanks,
Peter
More information about the rabbitmq-discuss
mailing list