Description
Short story: unregisterKey(K key)
and unregisterAllKeys()
does not unregister the key from Set<K> unlimited
, which seems to result in leaks over time.
Longer story:
In our (Spring) application, we dynamically spin up and spin down queues and SimpleMessageListenerContainer
s as needed. I can describe the workflow in more detail if anyone really cares. After a day or two of decent load, our memory usage tends to grow very large. Analyzing a heap dump showed that the majority of memory was being used by a few hundred thousand ShutdownSignalException
s and ChannelN
s and various other related objects that still had references, all of which led back to this one Set
in the WorkPool
class.
It seems like a simple solution would be to add two lines which also call unlimited.remove
, and I can create a Pull Request if desired, but I'm hoping that someone more familiar with the code can determine if this would cause any problems.
Thanks for all you folks do on this project. It's been fun implementing it into my system.
Link to feasible patch: https://gist.github.com/xathien/ec9ca35224868a524873