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 mvnrepository.com; 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]