You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by colomb <co...@gmail.com> on 2012/03/12 21:57:21 UTC

can a client detect broker failure?

Can a topic or queue consumer detect if the broker to which it is connected
has shutdown or failed?

--
View this message in context: http://activemq.2283324.n4.nabble.com/can-a-client-detect-broker-failure-tp4467364p4467364.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: can a client detect broker failure?

Posted by Torsten Mielke <to...@fusesource.com>.
Yes, certainly. 
If you are connecting to the broker using e.g. tcp://localhost:61616 as the broker url, then on broker failure the tcp connection will be lost and this triggers an exception back to the application level when trying to send/consume the next msg.

However in many scenarios you want the client to be able to transparently reconnect to the broker, which is achieved using the failover protocol.
http://activemq.apache.org/failover-transport-reference.html

Hope this helps.


Torsten Mielke
torsten@fusesource.com
tmielke@blogspot.com

On Mar 12, 2012, at 9:57 PM, colomb wrote:

> Can a topic or queue consumer detect if the broker to which it is connected
> has shutdown or failed?
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/can-a-client-detect-broker-failure-tp4467364p4467364.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.