The Web Console is a web app that can be downloaded and started in any servlet container such as Tomcat.
Here are some steps.
Enable ActiveMQ for JMX use in activemq.xml. That is - enable it in the broker tag: <broker useJmx="true"
.. and
And make sure createConnector
is true
.
<managementContext>
<managementContext createConnector="true"/>
</managementContext>
Download the .war from Maven. Better use the same version as the broker.
http://repo1.maven.org/maven2/org/apache/activemq/activemq-web-console/5.14.5/
Then setup the following JVM properties (JAVA_OPTS). Note that URL and ports may differ if you have changed them.
-Dwebconsole.type=properties
-Dwebconsole.jms.url=tcp://localhost:61616
-Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
If you have no Tomcat (or servlet container) and prefer to run your Spring boot apps with "java -jar .. " - you can do the same with the Web console.
Example below using this app: https://github.com/jsimone/webapp-runner
Had to add jstl jar as it wasn't bundled with webapp-runner.
java -Dwebconsole.type=properties -Dwebconsole.jms.url=tcp://localhost:61616 -Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi -cp jstl-1.2.jar:webapp-runner.jar webapp.runner.launch --port 8085 activemq-web-console-5.14.5.war
The admin console will be hosted on localhost at port 8085. This is just a starter. You may want to add fail-over, security etc etc. YMMV