Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I load test a RabbitMQ server (Either using JMeter, python or any other tool..)?

I have been given access to a RabbitMQ server to do a load test on it. I'm completely new to servers and AMQ protocol. I've been researching online to see what are some different methods. So far I'm investigating two methods.

  1. JMeter; I have found this project: https://github.com/jlavallee/JMeter-Rabbit-AMQP#build-dependencies . It gives me a jar file which I can create JMeter AMQP consumer and publisher, but I have no idea what to put in the fields. (virtual host vs host - dunno my ports -..) enter image description here

  2. Python; using Pika. I have a simple sender script which connects from my client to my server and sends a 'hello world' text to the server. Also wrote a receiver script to receive those 'hello world's. Is this a determination of load if I open multiple terminals and run my sender script 10 instances at the same time?

Again, I'm asking all these because I'm new to servers, cloud, load testing and Jmeter. It's just a task I have to do.

Thanks for any answer you can give me to clarify things a bit for me.

like image 969
BizMoto Avatar asked Jan 21 '16 23:01

BizMoto


1 Answers

You can use rabbitmq's Java Client Tools:
https://www.rabbitmq.com/java-client.html

It comes with a PerfTest:
https://www.rabbitmq.com/java-tools.html

You can run it using this command:

./runjava.sh com.rabbitmq.examples.PerfTest \
-h amqp://<user>:<password>@<host>:<port>/<vhost> \
-x <number_of_producers> \
-y <number_of_consumers> \
-s <message_size> \
-C <total_number_of_message> \
-u <queue_name>

There are other flags you can use too if you look at the documentation or the source you can see what they are.

Update/Shameless Plug
I wrote a web app that pulls these tools into one place https://github.com/johnlonganecker/rabbitmq-performance-app enter image description here

like image 119
jlonganecker Avatar answered Sep 30 '22 14:09

jlonganecker