[rabbitmq-discuss] Multi-threaded and high load publishers - channels pool vs connections pool...
Michael Klishin
mklishin at gopivotal.com
Mon Jun 16 15:45:24 BST 2014
On 16 June 2014 at 17:04:36, Shadi Mari (shadimari at gmail.com) wrote:
> > I am wondering whether having multiple channels per connection
> or multiple connections and one channel is better to achieve
> better scalability for multi-threaded and high load publishers.
>
> I am trying to circle publishers in a round-robin manner across
> channels or connections in order to minimize bottlenecks.
You cannot share channels between threads, you will get incorrect framing
(technically, frame interleaving) errors. Multiple connections unlikely
will make a difference and there is memory and socket overhead in using them.
So start with 1 channel per thread and measure in your own environment.
--
MK
Software Engineer, Pivotal/RabbitMQ
More information about the rabbitmq-discuss
mailing list