[rabbitmq-discuss] rabbitmq-c how many channels I need?

Alan Antonuk alan.antonuk at gmail.com
Tue Jun 18 17:58:32 BST 2013

On Tue, Jun 18, 2013 at 4:54 AM, Michael Klishin <
michael.s.klishin at gmail.com> wrote:

> 2013/6/18 Tim Watson <tim at rabbitmq.com>
>> And message ordering between threads sharing that channel doesn't matter,
>> presumably?
> Good point.
> Sharing channels between threads that publish is generally a bad idea:
> most clients don't offer synchronization and frames may get interleaved in
> an incorrect way. So for N publishers, you need N channels.
> Sharing channels between threads that consume may be safe but it really
> depends on whether you need message processing order guarantees
> and if any of the consumers share a queue.

rabbitmq-c doesn't synchronize use of any part of the connection. Using a
rabbitmq-c object from multiple threads requires external synchronization.
Additionally if you want to consume messages in one thread while executing
other AMQP methods in another using the same connection there is some
knowledge of the AMQP protocol required in order not to transmit a method
at inappropriate moment between frames.

> MK
> http://github.com/michaelklishin
> http://twitter.com/michaelklishin
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130618/57aea305/attachment.htm>

More information about the rabbitmq-discuss mailing list