activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ksunilsingh <>
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://
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

We are using spring DefaultMessageListenerContainer to listen for the

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

Please let me know whether it is possible and how.

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message