I am also experiencing same problem.
I am using ActiveMQ broker (v 5.3.1) and NMS ActiveMQ clients.
Consumer is subscribed to topic and uses asynchronous message receiving. However problem appears when consumer is idle for about 30 minutes, that is consumer stops receiving messages after it has been idle for approximately 30 minutes.
This problem does not appear when both clients and broker are running on same machine. Everything works fine when consumer application is restarted.
I have set maxInactivityDuration to 0.
I have also set handlers for ConnectionInterruptedListener, ConnectionResumedListener and ExceptionListener but no events are fired.
After I close consumer application ACTIVEMQ console does report one consumer less.
Here is transport connector configuration element in activemq.xml:
and client connects by using following uri:
Any idea why is this happening?