[rabbitmq-discuss] amqp_channel_open issue
irrer at umich.edu
Thu Feb 18 17:55:48 GMT 2010
So the C client is different from the Java client implementation, which says
threads can share a connection, but not a channel:
While a Channel can be used by multiple threads, it's important to ensure
that only one thread executes a command at once. Concurrent execution of
commands will likely cause an UnexpectedFrameError to be thrown.
Is my understanding correct?
If I have a multi-threaded Java client that needs many channels, then it is
ok (and more efficient)
to have one connection and construct many channels from it?
Jim Irrer irrer at umich.edu (734) 647-4409
University of Michigan Hospital Radiation Oncology
519 W. William St. Ann Arbor, MI 48103
On Thu, Feb 18, 2010 at 1:05 AM, Tony Garnock-Jones <tonyg at lshift.net>wrote:
> Hi Ragavendra,
> raghu a wrote:
> > As per my code each thread is using different channel.
> > May I get any multi threaded C client samples?
> I'm sorry to say that multithreaded use of librabbitmq will not work
> without quite a bit of effort. It is designed for event-based systems,
> not multi-threaded systems. Its internal architecture is quite different
> from our other client libraries, where sharing connections between
> threads is just fine.
> With that said, however, you *can* use librabbitmq with a connection per
> thread; just don't try to share a connection or its channels between
> threads at the moment.
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss