[rabbitmq-discuss] How to have multiple consumers for a Queue in Ruby

Jim Irrer irrer at umich.edu
Tue Feb 22 21:55:26 GMT 2011


Start multiple copies of the same program as different processes or
threads, and have them each bind to the same queue.  The default
RabbitMQ behavior seems to be a round robin as to which process
gets the next message.

This assumes that the messages on the queue can be processed in an
'embarrassingly parallel' sort of way.

Thanks,

- Jim

Jim Irrer     irrer at umich.edu       (734) 647-4409
University of Michigan Hospital Radiation Oncology
519 W. William St.             Ann Arbor, MI 48103


On Tue, Feb 22, 2011 at 12:43 PM, Rajat Vig <rajat.vig at gmail.com> wrote:

> Hi
>
> We've written an application using the amqp gem with RabbitMQ.
> Currently the bottleneck we've run into is that if there are too many
> message incoming then processing the queue takes long.
> After reading some messages on the list, I think allowing multiple
> consumers is the way forward.
>
> How do I do that? And are there any pitfalls/gotchas?
>
> -Rajat
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110222/745568a1/attachment.htm>


More information about the rabbitmq-discuss mailing list