activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: How can I "catch" ActiveMQ server disconnects in the client ?
Date Mon, 06 Oct 2014 13:50:16 GMT
On 10/06/2014 06:48 AM, Dani Kaplan wrote:
> I'm using the Dot Net NMS client.
> Once the server goes offline I get an exception on the listener thread
> (which I can only catch on the application level)
>
> I have 2 question.
> 1. Is there a way to catch the error like a message (adding "OnError" event
> like OnMessage)
> 2. I decided to periodically test the consumer for the connection state.
>      I can see in the watch that there is a property named "Closed" in the
> MessageConsumer Class the reflects the connection status. for some reason I
> can't access this properties (it will not compile as if it doesn't exists in
> the class or the interface) casting did not help.
>
> What would be the best way to handle server disconnect - (I want to wait a
> min, and try to reconnect again)
>
> Thanks,
> Dani
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/How-can-I-catch-ActiveMQ-server-disconnects-in-the-client-tp4686161.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Why not use the failover transport?

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


Mime
View raw message