I'm using WildFly 10 CR5 which I believe is using ActiveMQ 1.1.0. It is leaking 1 ConcurrentLinkedDeque$Node for every message transmitted. These can be traced back to the org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnection::readyListeners which has been changed in this version to a ConcurrentLinkedDeque (from a ConcurrentHashSet).
The leak would appear to be consistent with the discrepancy between the comment on the readyListeners member and the isWritable implementation, i.e. the callback is always added regardless of the 'ready' value. /** if {@link #isWritable(ReadyListener)} returns false, we add a callback * here for when the connection (or Netty Channel) becomes available again. */ private final ConcurrentLinkedDeque<ReadyListener> readyListeners = new ConcurrentLinkedDeque<>(); public boolean isWritable(ReadyListener callback) { synchronized (readyListeners) { readyListeners.push(callback); return ready; } } -- View this message in context: http://activemq.2283324.n4.nabble.com/NettyConnection-readyListeners-memory-leak-tp4705491.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.