activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rasmusback <>
Subject Clients can get stuck in a reconnect loop with master-slave brokers
Date Tue, 22 Mar 2011 14:31:19 GMT

I'm using the shared file system, master slave setup with two brokers on
separate servers. My clients are configured to use the failover transport
with a URL like this:
failover://(tcp://broker1:61616,tcp://broker2:61616)?randomize=false. I've
noticed that the order of the brokers in the failover URL seems to be
significant. If I start broker2 before broker1, so that broker2 becomes the
master and broker1 the slave, clients will get stuck in a reconnect loop
where they keep trying to connect to broker1.

Attached is a junit test case which exhibits the same behavior as my setup.
If the startup order of the brokers is different from their order in the
failover URL, the test will timeout. When the order is the same, the test
will pass.

The slave broker opens a socket, so a tcp connection is possible to it even
though the broker functionality isn't enabled. This might be what is
confusing the failover transport.

I'm not quite sure if my broker configuration is incorrect or if this is a
bug (or feature) in a master slave setup, so any help is much appreciated.
I'm using ActiveMQ 5.4.2 and spring-jms 2.5.5.


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

View raw message