[rabbitmq-discuss] What to do with "unwanted messages"

Robin Harvey harvey.robin at gmail.com
Sat Feb 19 11:48:02 GMT 2011


Hi,

What is the recommended course of action for dealing with unwanted messages
in consumers?  If a consumer sends basic.cancel there's a possibility that
there will be one or more "undelivered" messages (depending on the
prefetch-count parameters), is it best to basic.reject these before or after
sending basic.cancel?

A connected issue here is that sending basic.cancel alters the sequence of
messages on the target queue, the undelivered message gets requeued at the
end of the queue.  AFAICS this is to be expected given how the basic.consume
mechanism works, but is there anything I can do to prevent this re-ordering?
 I suppose that using basic.get instead would probably do the trick, but is
there some combination of basic.reject and/or basic.recover that can also
prevent this re-ordering?


Thanks,
--Robin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110219/f1fb3ede/attachment.htm>


More information about the rabbitmq-discuss mailing list