评论删除后,数据将无法恢复
We introduced HawtIO console as a tech preview in 5.9.0 ActiveMQ release, with an idea to replace the old and rusty web console in the distribution. Unfortunately, that idea didn’t go well with the rest of Apache community so it’s voted out and 5.9.1 is released without it. You can read more on the topic of distributing non-Apache developed web consoles in Apache projects in this (lengthy) thread if you’re interested.
Anyhow, there’s a lot of people out there who liked HawtIO and are asking questions on how to use it with the future (and some old) releases. So here, I’ll try to sum up different ways of how ActiveMQ and HawtIO can be used together.
HawtIO is pure JavaScript application that doesn’t have any server-side component. It uses Jolokia REST API to access managed servers. As a pure JavaScript application it’s possible to package it as a Chrome application, so you can run HawtIO locally in your browser. Take a look at the HawtIO Get Started guide on how to do this.
Once, you have your console running you can use it to connect to any remote broker, running management REST API (5.8.0 and newer). Take a look at this connect form
You can notice that management API uses /api/jolokia/
path and that by default ActiveMQ web server is listening on port 8161
. Just click Connect to remote server and you’ll have the access to the broker.
The nice thing is that you can save different broker settings in the application, so it’s easy to connect to any of the brokers you have in your environment with the single click.
So, if you’re a Chrome user or willing to use Chrome apps in this way, there’s really nothing stopping you from accessing remote brokers from your local HawtIO instance.
If this solution is not ideal for you, you can always embed the console back in your ActiveMQ installation. Luckily, it’s very easy thing to do.
First, you need to download Hawtio default war, presumably in the webapps/
directory of your installation
cd webapps wget http://central.maven.org/maven2/io/hawt/hawtio-default/1.3.1/hawtio-default-1.3.1.war
Now, add appropriate web application context to the web server, by adding something lile
<bean class="org.eclipse.jetty.webapp.WebAppContext"> <property name="contextPath" value="/hawtio" /> <property name="war" value="${activemq.home}/webapps/hawtio-default-1.3.1.war" /> <property name="logUrlOnStart" value="true" /> </bean>
to the etc/jetty.xml
The final step is to configure HawtIO authentication and adjust it to the broker’s one. This is done by providing the following system properties
-Dhawtio.realm=activemq -Dhawtio.role=admins -Dhawtio.rolePrincipalClasses=org.apache.activemq.jaas.GroupPrincipal
The easiest way to do it, is to add them to the ACTIVEMQ_OPTS
variable in the bin/activemq
startup script.
Now, run your broker and enjoy the hawtness.
Finally, if you’re interested in a great platform for running ActiveMQ and other integration technologies (HawtIO included), you should definitely give fabric8 a try. It provides an easy way to provision, configure and manage vast array of integration endpoints (broker included).
Or if you prefer standalone broker installation, you can try RedHat distributions that still come with the HawtIO included by default.
So, even if HawtIO is not distributed with ActiveMQ, you can easily use it in number of different setups depending solely on your preference.
评论删除后,数据将无法恢复
评论(1)