[rabbitmq-discuss] Strictly sequential queue processing with round-robin consumers

Lee Henson lee.m.henson at gmail.com
Wed Jul 13 10:26:27 BST 2011


This question is based on a hypothetical situation that I am going to do my
absolute best to avoid. I fully expect a "don't do that, it's a bad idea"
response. But just for arguments sake, I'd like to know whether such a
scenario is possible with rmq. Forewarned is forearmed, as they say..... :D

The scenario would be a durable persistent queue Q with n consumers C1, C2,
.. Cn. The queue should round-robin messages off to each consumer but only
delivering the next message to the next consumer when the previous consumer
has ACKed or REJECTed the last one. If the previous consumer failed in some
way, then that message should be delivered to the next consumer immediately
instead of delivering the next message in the queue. In this fashion, a
guaranteed order of processing could be relied upon and it would be
fault-tolerant with respect to consumers.

The only possible solution I could think of was setting the qos.prefetch to
a huge number, say 1000000. As I understand it, that will deliver 1000000
messages to one consumer before it starts delivering them to the next.

Any thoughts?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110713/f825e0af/attachment.htm>

More information about the rabbitmq-discuss mailing list