Hawtio Connecting to Remote ActiveMQ Brokers
The Integration Zone is brought to you in partnership with Red Hat. Download the IDC Report: The Business Value of Red Hat Integration Products to learn more about Red hat Integration.
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 hawtioTo 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.jarThis 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.0We 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 consoleThen 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
There is a few things to iron out to have hawtio fully working as a desktop app and as browser extension.