Hi all,

I wonder what's the best way to handle reconnect to the broker when broker
is unavailable (network is down / broker crashed, etc) using Java JMS client
to C++ broker?

Currently when using the JMS client when the broker is killed, a runtime
exception ( ConnectionException ) is thrown internally in qpid and I don't
see a way I can get this exception.

I tried to add a check each time it sends a message if the broker connection
is closed ( AMQConnection.isClosed() ) to re-attempt to reconnect.

However, I see that if the broker is disconnected not via
AMQConnection.close(), the state is never set to CLOSED and still set as
OPEN.

>From reading this:
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.3/pdf/Programming_in_Apache_Qpid/Red_Hat_Enterprise_MRG-1.3-Programming_in_Apache_Qpid-en-US.pdf

It has reconnect flags on using Python and C++ clients to automatically
reconnect if connection is lost.

But I wonder what's the best way to do this in JMS client?

Thanks,

Tim

Reply via email to