channel-cache-size

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

channel-cache-size

PATAR, SAGAR

We are using spring rabbit mq to configure the connection , connection factory , listener etc ..

 

We are trying to understand how the below properties work ..

1)      The requestedChannelMax in com.rabbitmq.client.ConnectionFactory ….. Does this only set the upper limit on how many we can create  .. Meaning this will  NOT influence the no. of channels created during initialization and will restrict NOT to create more than this number

 

2)       The channel-cache-size in the below bean initialization

<rabbit:connection-factory id="connectionFactory" connection-factory="cf" channel-cache-size="${session.size}"/>

 

Do we use this property used to create the channels upfront ?? ..

 

Does every channel opens a new socket to the server … How is opening a channel different from connection …

 

What is the advantage of opening a channel vs connection by using connection mode?

 

Please help us to understand the above.. appreciate all the help

 

-Sagar

 

 

 

 


_______________________________________________
rabbitmq-discuss mailing list has moved to https://groups.google.com/forum/#!forum/rabbitmq-users,
please subscribe to the new list!

[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: channel-cache-size

Gary Russell-2
I can answer number 2) 

Only a single connection is used for all channels (by default). The cache size is how many channels are cached (saved in a cache when "closed" instead of actually closing them). It does not preallocate channels, they are created on-demand and when "closed" either put in the cache or physically closed if the cache is full.

It's generally more efficient to multiplex channels over a single connection but you can configure the Spring CachingConnectionFactory to allow multiple connections if you need to for some reason.


On Thu, Jul 17, 2014 at 9:34 AM, PATAR, SAGAR <[hidden email]> wrote:

We are using spring rabbit mq to configure the connection , connection factory , listener etc ..

 

We are trying to understand how the below properties work ..

1)      The requestedChannelMax in com.rabbitmq.client.ConnectionFactory ….. Does this only set the upper limit on how many we can create  .. Meaning this will  NOT influence the no. of channels created during initialization and will restrict NOT to create more than this number

 

2)       The channel-cache-size in the below bean initialization

<rabbit:connection-factory id="connectionFactory" connection-factory="cf" channel-cache-size="${session.size}"/>

 

Do we use this property used to create the channels upfront ?? ..

 

Does every channel opens a new socket to the server … How is opening a channel different from connection …

 

What is the advantage of opening a channel vs connection by using connection mode?

 

Please help us to understand the above.. appreciate all the help

 

-Sagar

 

 

 

 


_______________________________________________
rabbitmq-discuss mailing list has moved to https://groups.google.com/forum/#!forum/rabbitmq-users,
please subscribe to the new list!

[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss



_______________________________________________
rabbitmq-discuss mailing list has moved to https://groups.google.com/forum/#!forum/rabbitmq-users,
please subscribe to the new list!

[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: channel-cache-size

Michael Klishin-2
In reply to this post by PATAR, SAGAR
On 17 July 2014 at 17:36:35, PATAR, SAGAR ([hidden email]) wrote:
> >
> We are trying to understand how the below properties work ..
>  
>  
> 1) The requestedChannelMax in com.rabbitmq.client.ConnectionFactory  
> ….. Does this only set the upper limit on how many we can create  
> .. Meaning this will NOT influence the no. of channels created  
> during initialization and will restrict NOT to create more than  
> this number

Correct. channel_max is a setting negotiated between client and server to determine
how many channels are allowed per connection. There is a respective RabbitMQ config
option in the recent versions.

You rarely need to modify it. Some clients even force a limit of 65,536 channels.
I've never seen a legitimate reason to use more channels than that. 
--  
MK  

Staff Software Engineer, Pivotal/RabbitMQ
_______________________________________________
rabbitmq-discuss mailing list has moved to https://groups.google.com/forum/#!forum/rabbitmq-users,
please subscribe to the new list!

[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss