Hi Tim,

The Java client uses the connection URL to control failover, but I'm not
sure whether/how that is honoured by the C++ broker. It also defaults on
trunk to use a NoFailover policy.

Rajith - I think you might have the most up-to-date knowledge on the Java
client failover on trunk, do you have a moment to assist Tim ?

Regards,
Marnie

On Sun, Nov 21, 2010 at 8:30 PM, Tim Chen <t...@evri.com> 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
> >
>

Reply via email to