activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ksunilsingh <ksunilsi...@gmail.com>
Subject Switching back to the primary remote broker after successful failover
Date Wed, 11 Jan 2012 00:22:28 GMT
We have a broker (let us call it Main Broker) running at tcp://0.0.0.0:61616.
This broker does a store and forward message to a remote broker. To do that,
we have a network connection from this broker to two remote brokers. We want
one of the remote brokers to serve as primary and other as failover. This is
the network connect URI that we are using
static:(failover://(tcp://*server1*:61617,tcp://*server2*:61617)?randomize=false)

We are using spring DefaultMessageListenerContainer to listen for the
messages
failover://(tcp://*server1*:61617,tcp://*server2*:61617)?randomize=false

In the normal scenario when all the brokers are up and running and a message
is sent to Main Broker, it is getting forwarded to server1 and is consumed
by the listener.

If we stop the broker on server1, the fail over is happening successfully
and the messages are getting forwarded to server2 and successfully consumed
by the listener. The problem is when we bring the server1 back up, the
messages continue to be forwarded by the main broker to server2. Our
requirement is that once the server1 is up and running, the Main broker
should start forwarding the messages to server1 and the listener should
connect back to server1 and consume messages. We cannot change randomize to
true because we want only one of the servers1 or server2 to be active at a
time.

Please let me know whether it is possible and how.


--
View this message in context: http://activemq.2283324.n4.nabble.com/Switching-back-to-the-primary-remote-broker-after-successful-failover-tp4283984p4283984.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message