Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ActiveMQ web console doesn't work with embedded broker

Tags:

java

activemq

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.

like image 872
darrickc Avatar asked Nov 25 '08 17:11

darrickc


People also ask

How do I access the ActiveMQ Web console?

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.

How do I open ActiveMQ in my browser?

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.

How do I send a message using ActiveMQ console?

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.


1 Answers

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

like image 107
James Strachan Avatar answered Oct 19 '22 06:10

James Strachan