[rabbitmq-discuss] Retrying messages that failed to process
Charles Law
charles.law at openx.com
Wed Jul 17 23:44:09 BST 2013
I have several consumers that could have exceptions raised while they are
processing a message. Right now I catch any exceptions and restart the
consumer (gracefully close the channel & connection, then in the same
process setup a new client). For some known errors I might also wait some
time between closing a connection and reconnecting.
What I want to do is, if a message was received but not acknowledged when
an exception is raised, "requeue" the message at the front of the queue so
it is retried immediately on any consumer (even the consumer that just
failed). Is there a preferred way to do this?
I tried not acknowledging the message at all, closing the channel and
connection and reconnecting and the unacknowledged message was not resent
for exactly 600 seconds. I am using pika/python if that matters. I have
had good luck with sending a recover before closing the connection as well
- I see the message sent again with requeue=False, but it will only retry
the messages 2x. I haven't had any luck using nack or reject. Any
suggestions?
--
Charles Law Software Developer
Watch how we make online advertising simple: http://bit.ly/Ent_vid
www.openx.com <http://www.openx.org/> | follow us on:
Twitter<http://twitter.com/openx>
Facebook <http://www.facebook.com/OpenX>
LinkedIn<http://www.linkedin.com/company/openx/products>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130717/e375c58d/attachment.htm>
More information about the rabbitmq-discuss
mailing list