Hi Marco,
Try this:
((AMQConnection)yourJmsConnection).setConnectionListener(
new org.apache.qpid.jms.ConnectionListener() {
...
public void failoverComplete() {
...
}
...
}
Phil
On 24 July 2013 09:26, pela <[email protected]> wrote:
> Hi,
>
> I'm building a client with JMS API and want to achieve automatic
> reconnection mechanism, that is when the connection to the broker is lost
> the client should reconnect automatically, resubscribe queues, etc.
>
> I've added failover=roundrobin to my connection URL and that seems to work
> even though there is only one broker in the brokerlist (it iterates over
> that single broker). On the other hand, the application code is not
> informed
> at all of the disconnection/reconnection events, because it's all done
> under
> the hood by the API.
>
> Is it possible some way to get some automatic reconnection mechanism, and
> at
> the same time know when the connection is broken (to inform the end user of
> the temporary disfunction of the system), and when the the connection is
> re-established (to inform the end user the system has come back to
> operation)?
>
> Thanks in advance for any advice.
>
> Regards
> Marco
>
>
>
> --
> View this message in context:
> http://qpid.2158936.n2.nabble.com/JMS-API-failover-tp7595846.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>