the brokers need to be in sync from the start. there is a waitForSlave attribute that can force the master to stall till the slave connects. see: https://issues.apache.org/activemq/browse/AMQ-596
2009/7/29 brendanr <brendan.rona...@gmail.com> > > Hi, > > I am having an issue with a simple master/slave setup. My master is running > on one machine (192.168.10.141), and my slave is running on a separate > machine (192.168.10.1). Attached are the config files for both master and > slave, and the log files for master and slave. I am running broker version > 5.2.0 and using activemq CPP library 3.0.1. My producer and consumers are > using the supplied sample code. > > On the master broker I get an exception saying the following: > ERROR MasterBroker - Slave Failed: ... > On the slave broker I get an exception daying teh following: > ERROR Service - Async error occurred: ... > > Please see attached log files for complete exceptions. > > I can easily reproduce the errors under the following conditions: > 1. Start the master broker > 2. Start a producer that connects to the master broker and sends 10 > messages > to queue TEST.FOO. Producer disconnects. > 3. Start the slave broker. It connects to teh master broker successfully. > 3. Start a consumer that connects to the master broker. It will retrieve > the > messages successfuly, but will cause the exceptions on both brokers. > > It doesn't matter if the producer and consumer connect to the broker using > the failover mechanism (using 2 addresses) or not. > If I start both brokers first, before connecting any producers/consumers > then I do not get the exceptions, but in the application I would like to > use > activemq in, it is not unreasonable that the master broker will have some > activity before the slave broker is ready to connect. > > Should activemq work the way I would like it to work, and if so what am I > doing wrong? Any help would be much appreciated. > > Thanks > Brendan > > > http://www.nabble.com/file/p24716703/activemq-master.logactivemq-master.log > http://www.nabble.com/file/p24716703/activemq-master.xmlactivemq-master.xml > http://www.nabble.com/file/p24716703/activemq-slave.log activemq-slave.log > http://www.nabble.com/file/p24716703/activemq-slave.xml activemq-slave.xml > -- > View this message in context: > http://www.nabble.com/Master-Slave%3A-Slave-Failed%2C-async-error-occurred-tp24716703p24716703.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- http://blog.garytully.com Open Source Integration http://fusesource.com