[rabbitmq-discuss] Consuming from multiple queues

Matthias Radestock matthias at lshift.net
Wed Jan 27 23:10:37 GMT 2010


Ilya Sterin wrote:
> how can a single consumer listen to multiple queues and process
> messages as they arrive on either of the queues.

You should be able to take the following line from your code

> channel.basicConsume(queueName, false, consumer);

and repeat it for every queue you want to consume from, using the same 
consumer object.



More information about the rabbitmq-discuss mailing list