activemq-classichigh-availabilityfailovermaster-slaveautomatic-failover

To fix a broker as master in ActiveMQ shared JDBC storage with MySQL


I am new to ActiveMQ. I am trying to configure ActiveMQ high availability using shared JDBC master/slave with MySQL. When the master fails the slave automatically takes charge (i.e. becomes the master) and grabs the lock in MySQL. I wanted to know if there is any way we can fix a broker as master so that if the slave takes charge and then the master gets reconnected and accepts connections again it doesn't have to wait for slave to fail.


Solution

  • ActiveMQ "Classic" doesn't support the notion of configuring a broker specifically as a master or a slave. You simply configure 2 brokers to use the same shared storage (whether that's disk or database) and whichever broker gets the lock first is the master broker and stays the master broker until it fails.

    You'd need to use ActiveMQ Artemis and configure failback to support your use-case.