Monday 13 June 2016

Configure JMeter to Load Test Rabbit MQ

Configure JMeter to Load Test Rabbit MQ

Pre-Requisite:
·         Installed RabbitMQ 3.6.1
·         Installed JMeter 3.0
·         Installed Ant 1.9.7

Note: 
I was getting lot of request for JMeterAMQP.jar file, so I have added the same into the following GitHub Repo: 
https://github.com/jatinaneja/jmeter_amqp

With this in place, one can jump to Step 2 directly, download JMeterAMQP.jar from above GitHub Repo and use it for copy operation.

Step 1: Download JMeter-RabbitMQ plugin code from GitHub

Visit GitHub at https://github.com/jlavallee/JMeter-Rabbit-AMQP and download the zip file of source code.

Extract the zip content.

Open terminal, go to the source of the extracted folder(JMeter-Rabbit-AMQP-master) and type ant (to build source code)



Step 2: Copy JMeterAMQP.jar into JMeter

Once step 1 is completed, go to folder “\dist” under “JMeter-Rabbit-AMQP-master\target\dist” folder.

Copy JMeterAMQP.jar into “\apache-jmeter-3.0\lib\ext” folder.

Step 3: Copy amqp-client-3.6.1.jar into JMeter

Download amqp-client-3.6.1.jar from Maven Repo (http://mvnrepository.com/artifact/com.rabbitmq/amqp-client/3.6.1)

Copy this jar into “apache-jmeter-3.0\lib” folder.

Step 4: Prepare Test plan in JMeter

Right click Test Plan and go to Add->Thread(Users)->Thread Group. Give a name to Thread Group





   
Right click your group and go to Add->Sampler->AMQP Publisher



Right click your group and go to Add->Listener->Graph Results



Now save the test plan and execute.



The test case will publish 4000(1000 * 4 time) message into the exchange (for which details were given when Sampler was added).

I would recommend following book from Amazon to have grip on better understanding regarding performance testing with JMeter :



3 comments:

  1. Hi,

    I am Rajesh. I used this jar's to send the payload to RabbitMQ queue using Jmeter. I am able to send the messages to Rabbit MQ queue. But its keeps on sending the same payload infinite times. It seems like this API expecting acknowledgement but we are not sending ackowlegement message in our code. So may be because of this reason its keeps on sending same message multiple times? Can you please help me? It's blocker for me. From last 3 weeks i am working on this but i could not find the exact root cause.

    Regards
    Rajesh D

    ReplyDelete
  2. Hi... When Im running ant, it is failing to Download the dependencies bcz the maven host is tried as http. It has to be https now.... where in the configuration, I should be changing the URL so that Auto configuration will be proper using ant. OR I can even download the dependency packages manually but dont know where to place it so that when I run ant command it should pick the downloaded files.

    Please provide the solution for either approach.

    Thanks

    ReplyDelete
  3. Can't resolve dependencies as was mentioned in the comment from 14 Feb 2021. The references specify http, but they fail because https is expected. Where are these references and how may the be corrected?

    ReplyDelete