In this case, we can use JMX to monitor embedded ActiveMQ.
To make the activeMQ could be monitored by JMX. The configuration file must be set like this
<broker xmlns="http://activemq.apache.org/schema/core" useJmx="true" brokerName="epMQBroker">
......
<!-- This may collide with JBoss/Websphere/Weblogic so need to set the port manually for now-->
<managementContext>
<managementContext connectorPort="1099" jmxDomainName="localhost"/>
</managementContext>
......
After the activeMQ is started embedded, run jconsole in %JAVA_HOME%/bin, click the "Advanced" tab, input the JMX url
service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
Note the port number must be consistent with the port number in "managementContext" in the configuration file.
No comments:
Post a Comment