Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Running Apache ActiveMQ and Hawtio in Standalone Mode

DZone's Guide to

Running Apache ActiveMQ and Hawtio in Standalone Mode

Learn how to integrate hawtio to a standalone project — in this case, one using ActiveMQ.

· Integration Zone
Free Resource

Share, secure, distribute, control, and monetize your APIs with the platform built with performance, time-to-value, and growth in mind. Free 90-day trial of 3Scale by Red Hat

Apache ActiveMQ is my first choice every time a Message Queue is needed to solve my integration problems. 

Unfortunately, the ActiveMQ Web Console is not that comfortable, so I decided to add the Red Hat JBoss project hawtio to my standalone ActiveMQ environment.
Hawtio is a modular web console for managing Java stuff. It has nice dashboards, a wiki, and lots of plugins for logs, health, JMX, OSGi, Apache ActiveMQ, Apache Camel, Apache OpenEJB, Apache Tomcat, Jetty, JBoss, and Fuse Fabric.

Currently, there are just a few tutorials out there that explain how to add hawtio to a standalone ActiveMQ installation. Unfortunately, these tutorials are outdated and misleading. Therefore, I am writing this tutorial. You can see it as an update of existing tutorials.
There are two ways to get your standalone ActiveMQ up and running with hawtio. You can either follow the following steps or take a look at my GitHub repository which contains a running version of ActiveMQ and hawtio. You can find it here.

Getting Started

  1. Download the latest version of ActiveMQ (download).
  2. Download hawtio offline .war file (download).
  3. Unzip the formerly downloaded ActiveMQ folder.
  4. Unzip the .war file.
  5. Rename the folder to just "hawtio".
  6. Copy it in the unzipped activemq/webapps folder.
  7. To override the hawtio auth defaults, open the env script, which is located in the bin folder in your ActiveMQ folder.
  8. Search for "ACTIVEMQ_OPTS" and add these three properties
-Dhawtio.realm=activemq 
-Dhawtio.role=admins 
-Dhawtio.rolePrincipalClasses=org.apache.activemq.jaas.GroupPrincipal


After these steps, you can access the hawtio web console via http://localhost:8161/hawtio and login with admin/admin. The hawtio web console looks like this:


As you can see, the hawtio is a really nice addon and much more comfortable than the standard ActiveMQ console. Give it a try! Have fun with ActiveMQ and hawtio!

Explore the core elements of owning an API strategy and best practices for effective API programs. Download the API Owner's Manual, brought to you by 3Scale by Red Hat

Topics:
jms ,activemq ,hawtio ,integration

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}