I am configuring HA for ActiveMQ Classic using shared JDBC master/slave with MySQL. I wanted to keep track of who is the current master broker, listening for connections. Because in case of fail-over of a master broker the slave will become the new master. How the master broker will be identified so that we can keep track of it?
1 Answer
The "master" broker is the one which accepts connections. The "slave" broker will be passive and therefore will not accept connections. Therefore, you can know which broker is the master by attempting to connect to both. Whichever broker accepts your connection is the master.