We are upgrading an application to use ActiveMQ (classic, version 5.15.9). Hence, we are aligning our existing JMeter (version 3.1) tests to use ActiveMQ. In the JMS Sampler, the properties have been modified and set as follow:
Still, I get the following error in the JMeter logs (even though functional tests work with that ActiveMQ stand-alone and queues):
ERROR - jmeter.protocol.jms.sampler.JMSSampler: queue.MyApp.RequestQueue javax.naming.NameNotFoundException: queue.MyApp.RequestQueue
at org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:235)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:337)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:659)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:996)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:978)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:628)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:616)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:245)
at java.lang.Thread.run(Thread.java:745)
Any thought on what I may have missed?
You need to configure JMS Point-to-Point Sampler a little bit differently, to wit:
Q.REQ
Q.RSP
Add the following JNDI properties:
queue.Q.RSP
with the value of queue.MyApp.ResponseQueue
queue.Q.REQ
with the value of queue.MyApp.RequestQueue
Full configuration just in case:
More information: Building a JMS Testing Plan - Apache JMeter
Demo: