Is the failover for a cluster or just to brokers.

For a cluster, the heartbeat etc need to be setup and the rest is automatic
from the failover exchange.

If just two brokers, then the connection URL needs to be used.

Carl.


On 11/21/2010 03:30 PM, Tim Chen wrote:
Anyone?

Tim

On Thu, Nov 18, 2010 at 2:10 PM, Tim Chen<t...@evri.com>  wrote:

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



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscr...@qpid.apache.org

Reply via email to