[rabbitmq-discuss] Newbie question on work queues with Rabbit MQ

Michael Klishin michael.s.klishin at gmail.com
Mon Nov 26 08:17:36 GMT 2012


2012/11/26 Rajesh <rajesh at saksestechnologies.com>

> Based on what I have seen in the samples we will have to run as many
> instances of worker.java as the number of consumers we
>  would need. Is this correct? If so what are the best practices in doing
> the same in java (from a deployment perspective)?
>
>  I am also thinking having one worker.java spawning multiple threads and
> each thread would register with the queue as a different
>  consumer. Is this possible? If so any pitfalls we need to be aware of?
>

Using multiple threads is a better idea. I'd recommend using a separate
channel for each thread, primarily because
error handling works on per-channel basis with RabbitMQ.
-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20121126/9302b5e6/attachment.htm>


More information about the rabbitmq-discuss mailing list