Published in


RabbitMQ throughput test using PerfTest and Autoscaling

Learn how to test the performance of your RabbitMQ instance using PerfTest and enable autoscale to add more resources to the deployment based on your usage.

Introduction to the PerfTest tool

RabbitMQ perfTest is a throughput test tool used to test the performance of your RabbitMQ deployment on cloud or on-premises. The tool is a Java-based client to run and simulate the basic or advanced workloads.

You can either download a binary build from the RabbitMQ perfTest releases GitHub or use Docker image.

Before you begin, Provision a Messages for RabbitMQ instance on IBM Cloud following the instructions.

Run the perf test

  1. Before running the PerfTest, from the Messages for RabbitMQ service credentials page, copy and save the username and password
Messages for RabbitMQ on IBM Cloud

2. For the AMQPS endpoint,

  1. Click on the Overview tab
  2. Scroll to the Endpoints section
  3. Click on the AMQPS tab.
  4. Copy and save the endpoint

3. Launch the terminal and run the below commands to set the username and password for AMQPS endpoint

export USERNAME=ibm_cloud_export PASSWORD=<PASSWORD>

4. If you are using the Docker image, run the below command by replacing <AMQPS_ENDPOINT> with your endpoint.

docker run -it — rm pivotalrabbitmq/perf-test:latest -x 10 -y 5 — uri <AMQPS_ENDPOINT>

Where x are the producers and y are the consumers. You can increase the throughput by increasing the number of producers over the consumers.

5. If you downloaded the binary build, navigate to the extracted folder on your machine and run the below command

bin/runjava com.rabbitmq.perf.PerfTest -x 20 -y 5 — uri <AMQPS_ENDPOINT> -f persistent — rate 5000 — consumer-rate 1000

6. The PerfTest tool provides options for slower startup time and higher memory consumption. The defaults for — body-count and — body-field-count are usually fine, but can be increased for more randomness.

bin/runjava com.rabbitmq.perf.PerfTest — uri <AMQPS_ENDPOINT> — json-body — body-count 50000 — size 100000

For example, bin/runjava com.rabbitmq.perf.PerfTest — uri amqps://$USERNAME1:$PASSWORD@cf11ab74–46c2–44a3-a3dd-9204d7396e6d.c7dvrhud08vgdqo60090.databases.appdomain.cloud:30411 — json-body — body-count 50000 — size 100000

For all the other parameters, check the basic usage section of the PerfTest documentation.

RabbitMQ Management console

The RabbitMQ Management UI is a browser-based interface that let you monitor RabbitMQ instance . You can monitor message rates.

  1. To launch the management console,
  • Navigate to the Endpoints section of the Overview page,
  • Click on the HTTPS tab
  • Click on the Launch button

2. Enter the username and password that you saved earlier and click on Login

RabbitMQ management console

To understand the management UI, I would recommend Understand the Management interface that gives a complete overview of the console.


You can either manually adjust the amount of resources available to your IBM Cloud Messages for RabbitMQ deployment to suit your workload and the size of your data or set your deployment to autoscale disk, RAM, or both.

Navigate to the resources tab of the service to enable autoscaling based on your usage. here’s an example

Autoscaling your RabbitMQ deployment


In this post, you learned how to use the RabbitMQ PerfTest tool to run throughput and load tests on your IBM Cloud Messages for RabbitMQ deployment. The tool can be used with any RabbitMQ instance deployed on any cloud or on-premises. You also understood on how to scale your deployment based on the load and usage.

If you have any queries, feel free to reach out to me on Twitter or on LinkedIn.

Further reading



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vidyasagar Machupalli

Vidyasagar Machupalli

Developer, IBMer, Speaker, Blogger, Teetotaller, Geek & many more…