The last couple of weeks I have spent some time on site working with ActiveMQ users helping them to get a decent benchmark in place for their JMS layer. I already had some code for a JMS benchmarking framework from earlier assignments and used the chance to get that a bit polished and documented.
Essentially it is designed to run a set of distributed JMS clients with a defined load profile. The framework will then measure the throughput and also allows to measure key performance indicators via JMX or on the OS level during the benchmark. This gives nice hints, whether the JMS server machines are CPU bound, lack IO capacity or have to less memory etc.
For all metrics graphs are created and if you want to run even more sophisticated analysises, all metrics are pushed into a CSV file that can be used in your favorite spreadsheet calculator.
The JMSTest framework is now a public project at FUSE Source.
Have fun trying it out if you want, any feedback is more than welcome.
Friday, September 25, 2009
Wednesday, September 2, 2009
Enabling Security for ActiveMQ web apps
Recently I was working with for a company to harden their set up of Active MQ. Though not the ultimate monitoring solution for Avtive MQ, they wanted to use the web console for providing some kind of ad hoc visibility on key properties. The ActiveMQ web page describes the set up that is pretty straight forward when an external servlet engine is used, but configuring the embedded jetty is a bit different.
From the ActiveMQ web console documentation we could see that we need 3 things:
Let's have a look at each of these things:
We start with rewriting the jetty bean definition in the default activemq.xml with the following activemq.xml:
Next you need to create the file webconsole.properties in the conf directory of ActiveMQ.The file contains one line per user with the format
For example:
Finally you need to amend the web.xml files of the ActiveMQ web applications (${activemq.base}/webapps/*/WEB-INF/web.xml) with the following xml fragment:
Make sure, the Realm name matches the one you have set in the Realm definition and the role name match roles you have named in the properties file.
From the ActiveMQ web console documentation we could see that we need 3 things:
- An User Realm that can be plugged into the Jetty engine.
- Credentials definitions.
- A security aware web application.
Let's have a look at each of these things:
We start with rewriting the jetty bean definition in the default activemq.xml with the following activemq.xml:
<!-- |
Next you need to create the file webconsole.properties in the conf directory of ActiveMQ.The file contains one line per user with the format
useName: password, [roleName]* |
For example:
myAdmin: THESECRET, amqAdmin |
Finally you need to amend the web.xml files of the ActiveMQ web applications (${activemq.base}/webapps/*/WEB-INF/web.xml) with the following xml fragment:
<security-constraint> |
Make sure, the Realm name matches the one you have set in the Realm definition and the role name match roles you have named in the properties file.
Subscribe to:
Posts (Atom)