You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Andres Rangel <an...@corp.moniker.com> on 2008/11/24 22:05:26 UTC
How to catch the event when the "FAILOVER" connection goes down and swithes to another broker
Hi,
We have a network of brokers ( 2 nodes) servicing the clients.
I would like to capture the event when one of the connections switches
from one broker to the other (because one of the
Nodes goes down)
If we use a normal transport with no reconnect option, then we can
capture the event by registering to the exceptionListener.
But if is failover, how can I capture this event?
Thanks
--
Andres Rangel
Sw Engineer
Moniker.com
Re: How to catch the event when the "FAILOVER" connection goes down
and swithes to another broker
Posted by WhiteSock <wh...@hotmail.com>.
Hi,
You can use the following codes:
ActiveMQConnection con = (ActiveMQConnection)connection;
con.addTransportListener(new TransportListener() {
@Override
public void onCommand(Object command) {
}
@Override
public void onException(IOException error) {
}
@Override
public void transportInterupted() {
}
@Override
public void transportResumed() {
}
});
cheers
--
View this message in context: http://www.nabble.com/How-to-catch-the-event-when-the-%22FAILOVER%22-connection-goes-down-and-swithes-to-another-broker-tp20669850p20681672.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: How to catch the event when the "FAILOVER" connection goes down and swithes to another broker
Posted by Gary Tully <ga...@gmail.com>.
Check out:
http://activemq.apache.org/maven/activemq-core/apidocs/org/apache/activemq/transport/TransportListener.html
You will get an interrupted and resumed event on failover.
> 2008/11/24 Andres Rangel <an...@corp.moniker.com>:
> Hi,
>
>
>
> We have a network of brokers ( 2 nodes) servicing the clients.
>
>
>
> I would like to capture the event when one of the connections switches
> from one broker to the other (because one of the
>
> Nodes goes down)
>
>
>
> If we use a normal transport with no reconnect option, then we can
> capture the event by registering to the exceptionListener.
>
>
>
> But if is failover, how can I capture this event?
>
>
>
>
>
> Thanks
>
>
>
>
>
>
>
> --
>
> Andres Rangel
>
> Sw Engineer
>
> Moniker.com
>
>
>
>
--
http://blog.garytully.com
Open Source SOA
http://FUSESource.com