Using JMeter for Performance Testing ActiveMQ

Some IT shops want to use open source software for everything.  For them, it’s a philosophical thing.  Having written Java code at the GAP in San Francisco, I can say they are one of those. A shop like that would probably be using ActiveMQ for messaging instead of IBM or Oracle’s messaging software, which are not free and not open source.

Here I give an overview of how you can use JMeter to test ActiveMQ or any other messaging middleware.  Plus you can use it to do performance testing on a webserver, LDAP, JDBC (database) connections, and more.

Apache ActiveMQ addresses performance in their documentation. They say performance is driven by:

  • Network topology
  • Transport protocol
  • Quality of servers
  • Number of producers and consumers
  • Message distribution and size
  • Hardware, JVM, and operating system

Apache provides some ideas on tools can test some of that, specifically Camel or JMeter.


In order to use Camel, you would need someone who is familiar with Maven, which is an Apache program used to build Java projects. Camel is included with ActiveMQ, but it’s complicated, unless you have worked with Maven. JMeter is easier, because it has a graphical interface.

The instructions for JMeter on the Apache web site are for ActiveMQ.  But it should work with any JMS middleware, since it lets you indicate the connection factory, provider URL, queue name, and other items.  Those would vary by vendor and installation.

Below is an overview of JMeter and ActiveMQ.

JMeter Performance Tests

If you want to set this up as a trial before you try it against your test, break-fix, or other environment, you can download ActiveMQ from the ActiveMQ website and install that and JMeter on a Linux box or Windows PC.  Ignore what they save about having to download JMeter from the ApacheMQ, as what I found there would not run, and go get that directly from

Like other Apache software, both JMeter and ActiveMQ are just zip files that you download, unzip, and then run from the bin folder at the DOS prompt or Linux console. The same software works on Linux as Windows, because it is Java.  You will need to set your JAVA_HOME environment variable to get it work.

Here is what ActiveMQ looks like when I start it up on my machine.


As you can see it has opened up a web page on port 8161 that I can open by going to http://localhost:8161 which then brings up this:


When you run JMeter, it launches the GUI shown below.  You can find instructions here on how to configure a publisher and subscribed and have them send messages back and forth to each other thus executing a performance test.


It took me a while to find the Sampler menu that the instructions mentioned.  It is under edit>add>sampler.  There you can configure a JMS server, LDAP, web server, JDBC and whatever you want to performance test.


Here is the JMS publisher configuration screen:


Here is how the publisher and publisher are organized once you have created them.  You save them as a test plan that you can call up and execute again once you have it working.