Skip to content

rabbitmq/rabbitmq-stream-perf-test

RabbitMQ Stream Performance Testing Tool

Build Status

This repository contains source code of the RabbitMQ Stream Performance Testing Tool. The client is maintained by the RabbitMQ team at Broadcom.

Stream PerfTest is based on the stream Java client and uses the stream protocol to communicate with a RabbitMQ cluster. Use PerfTest if you want to test streams or queues with AMQP 0.9.1.

Pre-requisites

Stream PerfTest requires Java 11 or later to run.

Installation

This is a standalone tool that is distributed in binary form using GitHub releases. A Docker image is available as well.

The latest snapshot is also available.

Support

See the RabbitMQ Java libraries support page for the support timeline of this tool.

Usage

Download the latest snapshot:

wget https://github.com/rabbitmq/rabbitmq-java-tools-binaries-dev/releases/download/v-stream-perf-test-latest/stream-perf-test-latest.jar

Launch a performance test with 1 producer and 1 consumer:

java -jar stream-perf-test-latest.jar

Use

java -jar stream-perf-test-latest.jar --help

to see all supported options.

Build Instructions

You need JDK 11 or later installed.

To build the JAR file:

./mvnw clean package -Dmaven.test.skip

To run the performance tool from the created binary:

java -jar target/stream-perf-test.jar

Running Tests with Docker

Launch the broker:

docker run -it --rm --name rabbitmq -p 5552:5552 -p 5672:5672 \
    -e RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS='-rabbitmq_stream advertised_host localhost' \
    rabbitmq:3.13

Enable the stream plugin:

docker exec rabbitmq rabbitmq-plugins enable rabbitmq_stream

Launch the tests:

./mvnw test -Drabbitmqctl.bin=DOCKER:rabbitmq

Running Tests with a Local Broker

To launch the test suite (requires a local RabbitMQ node with stream plugin enabled):

./mvnw verify -Drabbitmqctl.bin=/path/to/rabbitmqctl

Code Format

The project uses the Google Java Format. Read the documentation to support the format in your favorite IDE.

Please launch the ./mvnw spotless:apply command to format your changes before committing.

(c) 2020-2023 Broadcom. All Rights Reserved. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.

Double licensed under the MPL2.0 and ASL2. See LICENSE for details.