MQ

 View Only

Testing MQ With JMeter

By Paul Harris posted Mon November 28, 2022 08:48 AM

  

Testing MQ With JMeter

 

Load testing MQ solutions can be performed using a variety of tools. We recommend PerfHarness for JMS and MQ-CPH for native applications. These are lightweight command line tools providing a host of options to control the load presented to the queue manager.

Both are available for download from GitHub as stand-alone or containerised tools:

PerfHarness - https://github.com/ot4i/perf-harness
MQ-CPH - https://github.com/ibm-messaging/mq-cph

PerfHarness (container version) - https://github.com/ibm-messaging/jmstestp
MQ-CPH (container version) - https://github.com/ibm-messaging/cphtestp

 

Another solution is JMeter, but care must be taken to configure your JMeter test plan correctly, to ensure optimal performance. In particular, each client thread must create its own session object (which encapsulates a thread-scope connection to the queue manager) - see https://docs.oracle.com/javaee/7/api/javax/jms/Session.html.

Ideally producers and consumers should also be re-used to avoid opening and closing destinations on every iteration.

A sample JMeter test plan for MQ (mqperf-sender-receiver.jmx) is available for download which you can use as a starting point in developing your own.

This is a point-to-point test which runs senders (producers) and/or receivers (consumers). It’s recommended that both senders and receivers are run in parallel to avoid queue build-up, unless a specific, exception case is being simulated.

The script allows you to configure the number of connections, sessions, target queues, persistence etc. Here is an example of results from a short test with 10 sender connections, each with a single session and 10 receiver sessions, each with 2 sessions.


You can download the sample JMeter test plan along with more detailed intructions via our test harnesses resource page on GitHub here : https://github.com/ibm-messaging/mqperf/blob/gh-pages/testharness.md

0 comments
60 views

Permalink