RocketMQ Workload Generator

Introduction

A tool for testing the performance of Apache RocketMQ.

Quick Start

Install

Install via cargo

shell cargo install mq-workload-generator

Install manually

Download the binary from release page. Currently, only Linux and macOS are supported. For other platforms, you need to build from source on your own.

Basic usage

send and receive 100 messages per second to the topic test:

```shell mq-workload-generator --topic test --qps 100

example output:

this tool will print the current send and receive tps every second

Jul 25 10:38:44.203 INFO[src/main.rs:32:5] Begin generating workload and wait for the server to come online... Jul 25 10:38:44.204 INFO[src/main.rs:82:17] current send tps: 100, receive tps: 100 Jul 25 10:38:45.206 INFO[src/main.rs:82:17] current send tps: 100, receive tps: 100 Jul 25 10:38:46.205 INFO[src/main.rs:82:17] current send tps: 100, receive tps: 100 Jul 25 10:38:47.205 INFO[src/main.rs:82:17] current send tps: 100, receive tps: 100 ```

All available options:

```shell Usage: mq-workload-generator [OPTIONS] --topic

Options: -a, --access-point Access point of the mq cluster [default: localhost:8081] -t, --topic Target topic -p, --parallelism Number of the client [default: 1] -q, --qps Send tps of the sum of all producers [default: 100] --mode Mode of the workload test, available values: producer, consumer, producerandconsumer [default: producerandconsumer] --access-key Access Key to the topic [default: ] --secret-key Secret Key to the topic [default: ] -h, --help Print help -V, --version Print version ```

Use in Kubernetes

There is an out-of-the-box Kubernetes manifest file available for deploying the workload generator in Kubernetes.

shell kubectl apply -f deployment-consumer.yaml kubectl apply -f deployment-producer.yaml

TODO