I have an embedded broker completely configured through java code (no deployable xml files). When I point my browser to the web console I just get a 404, and an lsof shows that nothing is listening on 8161. Is it possible to use the web console with only java code? I'm fine with using the webserver that comes with ActiveMQ, and I'm fine with the 8161 port.
To access the management console use a browser and go to the URL http://localhost:8161/console. A login screen will be presented, if your broker is secure, you will need to use a user with admin role, if it is unsecure simply enter any user/password.
You can monitor ActiveMQ using the Web Console by pointing your browser at http://localhost:8161/admin . From ActiveMQ 5.8 onwards the web apps is secured out of the box. The default username and password is admin/admin.
If you click on the Send URL on the header menu, you'll need to manually enter the name of your queue or topic. The header to store the counter is automatically set to JMSXMessageCounter. Your message will go into Message body text area, after that you can just click Send.
If you are using Java code and not using Spring then just create your own servlet container yourself and register the admin WAR inside it.
This example shows how to do it in Java code which is taken from the source of the web console.
It will probably take you quite a few trial and errors to get all the required jars on your classpath mind you - you'll need all of Jetty, JSP, Serlvets, JSTL and more - plus the ActiveMQ stuff too
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With