[rabbitmq-discuss] Using the same channel for producer and consumer.

Michael Klishin michael.s.klishin at gmail.com
Sat Sep 10 05:00:03 BST 2011


2011/9/10 Praveen M <lefthandmagic at gmail.com>

> I was wondering if someone could explain this behavior. I'm using the java
> client and the latest 2.6.0 build of the server.


It is perfectly fine to use the same channel for consuming and publishing
messages. I cannot tell without seeing your code but what you are observing
is likely to be the blocking behavior of QueueingConsumer.

There is one downside to sharing channels this way: handling channel-level
exceptions may get trickier/require you to keep more state around.
-- 
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/20110910/b55305c5/attachment.htm>


More information about the rabbitmq-discuss mailing list