Skip to main content
Back to blog
tutorials 18 March 2020 1 min read

JMeter & RabbitMQ

Learn how to use Apache JMeter to interact with RabbitMQ message queues using the AMQP protocol for performance testing message-based applications.

M

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.jar
    • JMeterAMQP.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

ParameterValue
Hostlocalhost
Port5672
Usernameguest
Passwordguest
ExchangejmeterExchange
QueuejmeterQueue
Routing KeyjmeterRoutingKey

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:

#jmeter #rabbitmq #amqp #message-queue #performance-testing

Need help with performance testing?

Let's discuss how I can help improve your application's performance.

Get in Touch