JMeter & RabbitMQ
Learn how to use Apache JMeter to interact with RabbitMQ message queues using the AMQP protocol for performance testing message-based applications.
Mark
Performance Testing Expert
RabbitMQ is an open source message broker which uses the AMQP protocol. This tutorial demonstrates how to use Apache JMeter to interact with RabbitMQ message queues using JMeter’s AMQP client for message injection.
Requirements
- Running RabbitMQ instance on the same machine as JMeter
- Two JAR files:
amqp-client-3.0.3.jarJMeterAMQP.jar
Installation Steps
Place the downloaded files in these directories:
/<jmeter directory>/lib/amqp-client-3.0.3.jar
/<jmeter directory>/lib/ext/JMeterAMQP.jar
Core Functionality
AMQP Consumer Sampler
Reads messages from RabbitMQ queues using:
- Host
- Port
- Username
- Password
- Exchange name
- Queue name
- Routing key
AMQP Publisher Sampler
Sends messages to queues with the same parameters plus message content.
Example Configuration
| Parameter | Value |
|---|---|
| Host | localhost |
| Port | 5672 |
| Username | guest |
| Password | guest |
| Exchange | jmeterExchange |
| Queue | jmeterQueue |
| Routing Key | jmeterRoutingKey |
Performance
JMeter can handle thousands of messages a second from a single instance for typical small message sizes, making it an effective tool for performance testing message-based architectures.
Tags: