Enterprise Integration Zone is brought to you in partnership with:

Claus Ibsen is a principal software engineer from FuseSource. Claus is a full time committer on the open source integration framework Apache Camel (http://camel.apache.org) and author of the Camel in Action book (http://www.manning.com/ibsen). Claus is the most active contributor to Apache Camel and is very active in the Camel community. Claus is a frequent speaker at various conferences. Claus is a DZone MVB and is not an employee of DZone and has posted 51 posts at DZone. You can read more from them at their website. View Full User Profile

Hawtio Connecting to Remote ActiveMQ Brokers

02.06.2014
| 3740 views |
  • submit to reddit

hawtio is an awesome web console that allows you to manage your Java content. hawtio has a plugin for managing ActiveMQ brokers.

hawtio allows to run in one JVM and connect remotely to other JVMs. This allow you to have dedicated boxes with the management console, and leave it out of your production boxes which runs your ActiveMQ brokers, and other server stuff.  It also makes it easier to mange the network topology as people who need web access to the management console only need access to the boxes where the management console is hosted, and not direct access to your production servers. Only the boxes where the management console is hosted needs network connection to the production servers.

Anyway what I wanted to talk about in this blog, is how to use the latest hawtio 1.2.2 as a standalone application to connect to remote ActiveMQ brokers.

For this we use
- hawtio 1.2.2
- activemq 5.8.0

And in ActiveMQ 5.9 hawtio is shipped out of the box.

Starting hawtio

To do this we download the executable hawtio 1.2.2 which you can find on that big button on the getting started page.

To start hawtio we simply run this command from the command line:

java -jar hawtio-app-1.2.2.jar
This starts hawtio on port 8080, though you can specify the port number to use with --port option. For more information see the hawtio getting started page.

Connecting to ActiveMQ 5.8.0

We have Apache ActiveMQ 5.8.0 running on a box. For demonstration purpose I run it on my local laptop, and start ActiveMQ as follows:
davsclaus:/opt/apache-activemq-5.8.0$ bin/activemq console
Then from hawtio we click the Connect tab, and enter the details as shown in the screenshot below:


The username and password is by default admin/admin. Though that can be changed on the ActiveMQ broker, so make sure to use correct login credentials. And I use localhost as hostname because I run everything from the same box. But you can of course enter a DNS or IP name for remote connection.

When you are connected then the navigation bar in hawtio changes to which plugins are currently available running in that remote JVM. As its ActiveMQ 5.8 broker, you should see the ActiveMQ plugin, and can see broker details, as shown in screenshot below:



hawtio as desktop/browser application

In the upcoming hawtio 1.2.3 release James has been cooking some cool stuff to run hawtio as a desktop app and as a browser extension.
A little sneak peak is shown below where you can see hawtio as a app in the Chrome browser.

There is a few things to iron out to have hawtio fully working as a desktop app and as browser extension.
Published at DZone with permission of Claus Ibsen, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)