MQ JMeter Extension.
MQ JMeter Extension.
A JMeter Plugin to put and get message on IBM MQ Queue, also publish message on Topic. It connect to MQ Server through server channel using ip address, port number, userID and password (if the channel has CHLAUTH rules).
Build the extension:
mvn package
Install the extension mqmeter-x.y.z.jar
into
`$JMETER_HOME/lib/ext`.
Also you can install it through JMeter Plugins, search “IBM MQ Support”.
After installing mqmeter
, you can choose two kind of Java Sampler, these are:
Use it to put and get message (optional) on MQ queue. On JMeter add a Java Request Sampler and select the MQClientSampler
class name. The following parameter are necessary.
MQ can manage topics also and you can publish and subscribe to it, use this class to publish message on MQ Topic.
On JMeter add a Java Request Sampler and select the MQPublishSampler
class name. The following parameters are necessary.
The below images show where find the values for some of the above properties
You can find the steps to add users access to MQ Manager through Channel Authentication (CHLAUTH) with this tutorial
IBM CHLAUTH
When use the MQPublishSampler Java Sampler is possible that you get the below exception:
java.lang.NoSuchMethodError: com.ibm.mq.MQQueueManager.accessTopic(Ljava/lang/String;Ljava/lang/String;II)Lcom/ibm/mq/MQTopic;
at co.signal.mqmeter.MQPublishSampler.setupTest(MQPublishSampler.java:123) ~[mqmeter-1.4.jar:?]
at org.apache.jmeter.protocol.java.sampler.JavaSampler.sample(JavaSampler.java:194) ~[ApacheJMeter_java.jar:3.3 r1808647]
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:498) ~[ApacheJMeter_core.jar:3.3 r1808647]
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:424) ~[ApacheJMeter_core.jar:3.3 r1808647]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255) ~[ApacheJMeter_core.jar:3.3 r1808647]
at java.lang.Thread.run(Unknown Source) [?:?]
It is throw because there is com.ibm.mq* jar file that is upload by JMeter and it does not have the methods related with topic or other MQ objects. It jar file isn’t related with mqmeter plugin but JMeter calls it first.
Checking JMeter lib and ext folders to remove com.ibm.mq* jar files that do not have methods or mq topic objects.