[rabbitmq-discuss] one queue - two consumers with prefetch 100
vbernard42 at gmail.com
Thu Dec 1 12:47:26 GMT 2011
RabbitMQ uses round-robin dispatching. You can get more information
With your example, it would be: 1 to C1, 2 to C2, 3 to C1, 4 to C2,
etc. If one of the worker is busy, and the other one isn't, the
message will be delivered to the worker who isn't busy — which implies
that a worker may receive several messages in a row.
On 1 déc, 13:00, pavuuu <pavankumar.maniko... at schneider-electric.com>
> I have two consumers(C1 & C2) with prefetch set to 100 on each of them. Also
> both the queues are bound to the same queue on server. Now, say I've sent
> 1000 messages. Let us name the messages in queue from 1 to 1000, 1 being the
> first message published into the queue and 1000 being the last one.
> If both the consumers start running at the same time what way messages are
> dispatched to the consumer ??
> 1 - 100 to C1 ----- 101 to 200 to C2 ----- 201 - 300 to C1 ----- 301 to
> 400 to C2 ------- and so on ??
> View this message in context:http://old.nabble.com/one-queue---two-consumers-with-prefetch-100-tp3...
> Sent from the RabbitMQ mailing list archive at Nabble.com.
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
More information about the rabbitmq-discuss