--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/9abe231a-25e4-492c-9ad5-766ece721016%40googlegroups.com.
Given both of these factors, limiting the number of channels used per connection is highly recommended. As a rule of thumb, most applications can use a single digit number of channels per connection.
> To unsubscribe from this group and stop receiving emails from it, send an email to rabbitm...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/333634cc-69b6-4b6f-bf20-242d6c65a0c5%40googlegroups.com.
The issue looks like #194 nevertheless and the workaround needs some specific settings:
connectionFactory.setRequestedHeartbeat(5); ExecutorService shutdownExecutor = Executors.newSingleThreadExecutor(); connectionFactory.setShutdownExecutor(shutdownExecutor);
> To unsubscribe from this group and stop receiving emails from it, send an email to rabbitm...@googlegroups.com.
Exchanges and queues are global to the virtual host, so they are "visible" to all the channels. One exception is exclusive queues, which are exclusive to the connection that created them, so by extension to the channels of the connection. If you don't use exclusive queues, you don't have worry about visibility of resources among your channels.
> 2. Should I close the channels explicitly ? I'm guessing when the connection is closed - the channel will also be closed?
Yes, the channels of a closed connection are not usable anymore.
> 3. Is there a maximum channels per connection that we can\should (or not) create ?
There is a limit, the default being 2047 channels per connection [1] (see [2] for the rational behind this value). Yet this is configurable and even negotiable between the client and the server [3]. Nevertheless the defaults should be fine for most applications.
The whole channels page [4] could be a useful read to tackle this task.
[1] https://github.com/rabbitmq/rabbitmq-server/blob/b8edec02392fba0788db0ccfea5af5017fc64485/Makefile#L28
[2] https://github.com/rabbitmq/rabbitmq-server/issues/1593
[3] https://www.rabbitmq.com/channels.html#channel-max
[4] https://www.rabbitmq.com/channels.html