[rabbitmq-discuss] channel limits

Matthew Sackman matthew at lshift.net
Wed Nov 18 13:13:26 GMT 2009


On Tue, Nov 17, 2009 at 12:06:45PM -0800, JD Conley wrote:
> Are there limits on the number of channels that can be created per cluster
> node, per connection, per anything?

Yes. Memory is likely the limiting factor - channels do not have zero
cost. The channel number is a short in the AMQP spec, which means 16
bits, so 65535 is the maximum channel. It's likely you'll need to tune
Erlang slightly for this given the default number of processes is 32768.
A +P 134217727 arg to erl should get round this for you.

> I read from archives about a year ago that channels are expensive to create.
> Is this still true in 1.7.0? 

They're certainly not free and you should reuse them as much as
possible. Depends how you define expensive though - compared to sending
a message, definitely. Compared to writing RabbitMQ, certainly not.

> Does having a lot of channels open concurrently significantly add to the
> overhead of any other operations?

If the choice is between doing N actions on one channel and doing N
actions on M channels where M is large, the former will be faster, if
only for cache and scheduling reasons. Also a number of other processes
within Rabbit are either "per channel" or measure things on a per
channel basis, thus there will be some additional accountancy and so
forth.

Matthew




More information about the rabbitmq-discuss mailing list