- JBoss A-MQ 6.2
Using the ActiveMQ broker's Health JMX MBean to monitor the broker's status (JMX bean org.apache.activemq:type=Broker,brokerName=localhost,service=Health) its CurrentStatus JMX attribute does not update automatically when there is a change in the brokers health (e.g. running low on disk space, etc).
However when using the MBean JMX operations health() or healthList() the CurrentStatus JMX attribute is getting updated correctly.
The CurrentStatus attribute of the JMX Health MBean is not updated automatically.
It is computed on request only (i.e. when invoking the health() or healthList() JMX operations on the MBean). The broker does not push any health changes to this MBean by itself.
To update the CurrentStatus of the JMX Health MBean, you need to invoke one of the JMX operations health() or healthList().
Check the source of activemq-broker/src/main/java/org/apache/activemq/broker/jmx/HealthView.java. The currentState attribute only gets updated when the JMX operations are invoked.
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.