Reputation: 61
We are creating a simplemessagecontainerlistener for every host and after every message we stop the container. Is it possible to close the rabbitMQ connection from the container?. Currently we are running into memory leak in our application due to many rabbitMQ threads to the hosts.
Upvotes: 0
Views: 276
Reputation: 174554
Why a new container start/stop for each message? Why not use rabbitTemplate.receive()
instead.
There is only one connection by default; channels are cached according to the configuration and are only cached when closed if you have increased the cache size.
What is the nature of the "memory leak" ?
When asking questions like this, show your configuration.
Upvotes: 1