Announcement Announcement Module
Collapse
No announcement yet.
spring - rabbitmq when are channels closed Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring - rabbitmq when are channels closed

    Hi all,

    I am trying to find out when Spring will close a channel it has opened to RabbitMQ.

    Thanks,
    Frank

  • #2
    The CachingConnectionFactory caches the connection and (by default) 1 channel; the number of cached channels can be configured but you cannot set it to less than 1. Channels in excess of the cache size are closed when returned to the cache.

    Comment


    • #3
      Hi Gary,

      When using the CachingConnectionFactory and opening many channels that are only needed for a very short period of time is there a way to close the channels explicitly?

      Thanks again,
      Frank

      Comment


      • #4
        If you use the default settings, only one channel will remain open, all the others will be closed when they are returned to the cache. No, you can't close the channel explicitly (although you could dig into the proxy and close the target Channel, but I wouldn't recommend that).

        Comment

        Working...
        X