[rabbitmq-discuss] use one channel for many consumers/producers
Michael Klishin
michael.s.klishin at gmail.com
Mon Nov 12 16:31:52 GMT 2012
2012/11/12 Mohsen Lotfizad <mtlotfizad at gmail.com>
> the problem is that in my WeatherConsumer when I try to read a message
> (with nextDelivery() ) the thread go to wait! So I guess the problems raise
> from using a channel for many consumers.
There is no guarantee that there is a message to receive immediately, so
QueueingConsumer#nextDelivery
waits for it to become available. If you need to start 20 of them, start
them in 20 threads.
--
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/20121112/3c6a8c73/attachment.htm>
More information about the rabbitmq-discuss
mailing list