activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fenbers <>
Subject How to detect a consumer's lost connection
Date Sun, 02 Jun 2013 12:37:36 GMT
If ActiveMQ is restarted, we find that our producers and our consumers have
to be shut down and relaunched in order to reestablish the connection with
ActiveMQ.  This is a royal pain!  However, a producer will throw an
exception whenever it tries to send a message through a lost connection, and
so I catch the exception where I can close the connection and reopen it. 
Thus, my producers are able to reconnect automatically in the event ActiveMQ
is restarted.

But with a consumer, no exception is thrown as it waits for message
notifications.  It simply waits eternally for a notification that never
happens once a connection with ActiveMQ is lost.  So what is the recommended
approach for a consumer to check for a disconnection?? 

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message