Creating a Red Hat AMQ Broker or ActiveMQ Artemis Stress Testing using JMeter
Red Hat AMQ Broker (or its Opensource version, Apache ActiveMQ), is a flexible, high-performance messaging platform that delivers information reliably, enabling real-time integration. It can handle lot of messages at the same time, up to 21-22thousands messages/seconds, as per below link.
https://activemq.apache.org/performance.html
In this article, im trying to try and see how many transaction can one AMQ handle by using a JMeter script. Lets start by installing ActiveMQ Artemis from docker,
docker run -it --rm \ -p 8161:8161 \ -p 61616:61616 \ -e ARTEMIS_USERNAME=admin \ -e ARTEMIS_PASSWORD=password \ vromero/activemq-artemis
Next step is downloading JMeter, and creating a test plan. But first, we need to download artemis-jms-client first and put it on our JMeter_FOLDER/lib/ext folder.
Next is opening our JMeter and create a thread group, for this example im creating 2 loops , with 2 threads each.
Create JMS Publisher, with below parameter
Initial Context Factory : org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
Provider URL : tcp://localhost:61616
User Authorization : admin
Password Authorization : password
Connection Factory : ConnectionFactory
Destination : dynamicQueues/queue01
JMSCorrelationID : ${__counter(FALSE,)} with class of value java.lang.String
Create JMS Subscriber, with below parameter
Initial Context Factory : org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
Provider URL : tcp://localhost:61616
User Authorization : admin
Password Authorization : password
Connection Factory : ConnectionFactory
Destination : dynamicQueues/queue01
Run JMeter and we can see the result on both Result Tree and Summary Report,

Have fun stresstesting AMQ 🙂



