[rabbitmq-discuss] Retrying messages that failed to process
michael.laing at nytimes.com
Thu Jul 18 00:54:28 BST 2013
Hmmm - I use pika a lot and have occasion to use channel.basic_nack. It
takes about 5 ms before the message is picked up by another consumer in my
If you are using BlockingConnection, I would suggest testing instead with
one of the asynch adapters, e.g. SelectConnection. Or use TornadoConnection
if you need more speed/responsiveness, or LibevConnection (which I wrote
and is in a pull request at the pika project github) if you are adventurous
and want "the one that rules them all" (for python anyway).
There's really no good reason for the delays you are experiencing.
AFIK, however, the rejected/nacked messages is queued as if it were new,
but with the redeliver flag set, AND any consumer may receive them,
including the one which rejected/nacked them. Of course if you have
multiple consumers on a queue, the rabbit will round-robin.
But, the rejected/nacked message does not go to the 'front' of the queue as
you desired (again AFAIK).
At the platitude level, I would suggest that you 'think async' - because
the real world, and rabbitmq, work that way. Avoid anything with 'blocking'
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss