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

10 views
Skip to first unread message

Lee Henson

unread,
Jul 13, 2011, 5:26:27 AM7/13/11
to rabbitmq...@lists.rabbitmq.com
Hi

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?

Cheers
Lee


Eugene Kirpichov

unread,
Jul 13, 2011, 6:30:40 AM7/13/11
to Lee Henson, rabbitmq...@lists.rabbitmq.com
No, IIRC qos doesn't do that. It will still roundrobin, but it will
not stop roundrobining to a particular consumer until you accumulate
100000 unacked messages there.

2011/7/13 Lee Henson <lee.m....@gmail.com>:

> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq...@lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>

--
Eugene Kirpichov
Principal Engineer, Mirantis Inc. http://www.mirantis.com/
Editor, http://fprog.ru/
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq...@lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

Reply all
Reply to author
Forward
0 new messages