简体   繁体   中英

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 (ie 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM