Monitor
ActiveMQ through JConsole/ How to connect AtiveMQ through JConsole?
Step 1:
Apache Active MQ has extensive support for JMX to allow you to monitor and control the behavior of the broker via the JMX MBeans
You can enable/disable JMX support as follows…
Setting the broker property use JMX to true (enabled by default) in activemq.xml file which is located in-:..\\ActiveMQ home directory\conf.
i.e. For xbean configuration
<broker use JMX="true" brokerName="BROKER1" --- </broker> |
Step 2: Password Protecting the JMX Connector
(For Java 1.5+)
Make sure JMX is enabled, but tell ActiveMQ not create its own connector so that it will use the default JVM JMX connector.
<broker xmlns="http://activemq.org/config/1.0" brokerName="localhost"useJmx="true"> ... <managementContext> <managementContext createConnector="false"/> </managementContext> ... </broker> |
# The "monitorRole" role has readonly access. # The "controlRole" role has readwrite access. monitorRole readonly controlRole readwrite |
# The "monitorRole" role has password "abc123". # The "controlRole" role has password "abcd1234". monitorRole abc123 controlRole abcd1234 |
wrapper.java.additional.13=-Dcom.sun.management.jmxremote.port=1616
wrapper.java.additional.14=-Dcom.sun.management.jmxremote.authenticate=true
wrapper.java.additional.15=-Dcom.sun.management.jmxremote.ssl=false
wrapper.java.additional.16=-Dcom.sun.management.jmxremote.password.file="%ACTIVEMQ_BASE%/conf/jmx.password"
wrapper.java.additional.17=-Dcom.sun.management.jmxremote.access.file="%ACTIVEMQ_BASE%/conf/jmx.access"
ACTIVEMQ_SUNJMX_START=-Dcom.sun.management.jmxremote.port=1616 -Dcom.sun.management.jmxremote.ssl=false \ -Dcom.sun.management.jmxremote.password.file=%ACTIVEMQ_BASE%/conf/jmx.password \ -Dcom.sun.management.jmxremote.access.file=%ACTIVEMQ_BASE%/conf/jmx.access |
ACTIVEMQ_SUNJMX_START=-Dcom.sun.management.jmxremote.port=1616 -Dcom.sun.management.jmxremote.ssl=false \ -Dcom.sun.management.jmxremote.password.file=%ACTIVEMQ_BASE%/conf/jmx.password \ -Dcom.sun.management.jmxremote.access.file=%ACTIVEMQ_BASE%/conf/jmx.access Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_BASE}/conf/jmx.password \ -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_BASE}/conf/jmx.access" |
service:jmx:rmi:///jndi/rmi://<your hostname>:1616/jmxrmi |