All,

I have setup a Master/Slave cluster on a single machine by creating two broker instances on the same machine (ActiveMQ 5.12.1) with shared kahadb. During the process of setup, I have setup different ports (61616 and 61626) for brokers.

However, when the second broker is started it would detect the lock on kahadb and goes into "slave" mode with following log message.

----------------------------------------------------------------
INFO | Database /opt/activemq/data/kahadb/lock is locked by another server. This broker is now in slave mode waiting a lock to be acquired | org.apache.activemq.store.SharedFileLocker | main
----------------------------------------------------------------

I have also noticed that none of the services are running on the ports configured for second broker (for example, 61626). However, when the first broker is stopped/terminated then the slave broker starts listening on configured ports and serves incoming requests.

Is this the expected behavior that in "slave" mode it will not run the services? If yes, I am looking to run two brokers on same machine in master/slave mode to achieve "hot standby" where client need to know about only one ActiveMQ connection URI (both application clients and NoB configs). Is there anything I am missing here or potential gotchas?

Thanks

Reply via email to