[AMQ6.3, slave] how to tell if broker is running as a slave

Solution Verified - Updated -

Environment

  • Red Hat AMQ 6.3

Issue

  • script to identify if the broker is running as a slave or master

Resolution

Using the JMX broker attribute "slave" you can tell if the broker is running as a "slave" or "master" .

To access this from the command line you could use a curl command and point it at the jolokia port (usually 8181 when running on karaf) e.g. of command and output below:


curl -u <myuser>:<mypassword> http://localhost:8181/hawtio/jolokia/read/org.apache.activemq:type=Broker,brokerName=amq/Slave {"timestamp":1538473595,"status":200,"request":{"mbean":"org.apache.activemq:brokerName=amq,type=Broker","attribute":"Slave","type":"read"

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.