activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SuoNayi <>
Subject Re:How to detect a consumer's lost connection
Date Mon, 03 Jun 2013 01:50:43 GMT
Just use the failover transport instead of your plain tcp transport, 
it can reconnect to the broker transparently and it will replay 
producers/consumers, the connection and pending transactions 
when reconnection is successful.

At 2013-06-02 20:37:36,fenbers <> wrote:
>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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message