the default caching strategy using Spring AMQP is to create a single connection with multiple channels. The number of created channels depends on the concurrency of the listeners.
This creates an issue for us because we have lots of listeners with a concurrency of only a few consumers. Rabbit documentation recommends using a single-digit number of channels per connection.
When we have a few listeners, let's say 10, and each of them needs a concurrency of 5. This creates a single connection with 50 channels which is far more than recommended.
I have tried playing with spring.rabbitmq.cache properties but I cannot figure out how to set it up so each listener uses its own connection with 5 channels. I would prefer to create 10 connections with 5 channels over 1 with 50.
Can someone point me in the right direction?