[rabbitmq-discuss] Round Robin, again

Ben Hood 0x6e6562 at gmail.com
Fri Aug 1 10:12:59 BST 2008


Paul,

First of all, sorry about the delay in answering this, because it
didn't go through the list it fell into the wrong message queue in my
mail account.

On Wed, Jul 23, 2008 at 8:41 AM, Paul Jones <pauljones23 at gmail.com> wrote:

> One question we had was whether there was any way to get around the bit
> where the specification states that messages are delivered to multiple
> consumers in a round-robin fashion. The scenario I'm thinking of is
> something like:
>
> Message 1 goes to Consumer A, and takes a long time.
> Message 2 goes to Consumer B, and is done very quickly.
> Message 3 goes to Consumer A (round-robin), and is delayed because it is
> waiting for Consumer A to be ready (even though Consumer B is idle).
>
> I assume the behaviour happens because the consumer part of the amqp library
> is buffering messages. Apparently people have asked similar sorts of
> questions on the mailing lists, and have ended up implementing queues within
> their own applications - which works fine up until you want to scale across
> multiple machines.
>
> I was wondering if it would be possible to reduce the buffer length to 0 or
> something like that? Obviously that would impact the time it takes a message
> to be delivered, but it would certainly result in the time spent in queue
> going down for messages in the above scenario.
>

I don't know if you have been following the discussion on this list
lately about round robin deliveries.

This is an issue for a number of people and we think we have a
straight forward solution for this.

Tony has been discussing various options surrounding the qos command
which would allow the user to set the pre-fetch window size of a
consumer.

Please stay tuned for the resolution.

Ben




More information about the rabbitmq-discuss mailing list