Building a JMS test plan with JMeter and ActiveMQ

JMeter supports JMS test plans almost out of the box. Only a simple operation is needed before using the dedicated samplers.

JMeter supports the JMS API but does not bundle any implementation (source). We are going to use Apache ActiveMQ as an implementation and make it available to JMeter.

Download the activemq-all-x.y.z.jar artefact, from say; direct link to v5.9.0.

Move the downloaded JAR to the JMETER_HOME/lib folder, for this is the right place for “utility jars”, according to the doc.

If JMeter is already started, you have to restart it before going on.

Now, you can follow the official tutorial without getting errors such as:

Response message: javax.naming.NamingException: javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.activemq.jndi.ActiveMQInitialContextFactory 
[Root exception is java.lang.ClassNotFoundException: org.apache.activemq.jndi.ActiveMQInitialContextFactory]

4 thoughts on “Building a JMS test plan with JMeter and ActiveMQ

  1. Had to leave a comment to say that this fixed a problem I was having for days. And this short blog post is the only resource I found with this solution.


Leave a Reply

Your email address will not be published. Required fields are marked *