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

Praveen M lefthandmagic at gmail.com
Tue Sep 13 00:38:41 BST 2011


Thank you michael. I found what the issue was...I was setting the fields
mandatory and immediate as true when i publish messages. This was causing me
to lose messages when the consumer wasn't subscribed to the queue.


On Fri, Sep 9, 2011 at 9:00 PM, Michael Klishin <michael.s.klishin at gmail.com
> wrote:

> 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
>
>


-- 
-Praveen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110912/6bf4ddbf/attachment.htm>


More information about the rabbitmq-discuss mailing list