Message queue testing
A message queue decouples producers from consumers. That is its strength and the reason it needs its own load test: the backlog absorbs pressure, so producers keep reporting success while consumers quietly fall behind. By the time an HTTP-style test would notice, the queue is minutes deep. This section gives you a copy-paste Locust file for each of five common brokers, plus the rules for running them safely.
What the tests measure
Section titled “What the tests measure”Every guide reports the same three numbers:
- Send latency: how long a producer waits for the broker to accept a message.
- Consume rate: how many messages per second the consumers keep up with.
- End-to-end latency: time from send to receipt by a consumer. A value that climbs over the run means consumers are falling behind.
They appear in the run results as two labels per queue: <queue> send and <queue> end-to-end. For example, the Kafka guide reports kafka send and kafka end-to-end.
How it works on MaxoPerf
Section titled “How it works on MaxoPerf”- The tests run on the Locust executor. Upload the
locustfile.pydirectly. No YAML is needed. - Each guide’s
taurus.ymlinstalls its client library when the test starts, with Taurus’s built-inpip-installservice. Nothing is preinstalled on the runner. - Connection values (URL, bootstrap servers, credentials) come from workspace secrets bound to the test as
SECRET_*environment variables. See Secrets and environments. - The broker must be reachable from the runners. Managed runners need a public endpoint. For a broker inside your network, use a private datacenter outpost.
- Only load-test brokers, topics and queues you are authorised to load. Read Message queue testing: do and don’t first.
Pick your queue
Section titled “Pick your queue”| Queue | Client library | Guide | Blog post |
|---|---|---|---|
| Apache Kafka | confluent-kafka | Load test Apache Kafka on MaxoPerf | Load testing Kafka |
| RabbitMQ | pika | Load test RabbitMQ on MaxoPerf | Load testing RabbitMQ |
| Amazon SQS | boto3 | Load test Amazon SQS on MaxoPerf | Load testing Amazon SQS |
| NATS JetStream | nats-py | Load test NATS JetStream on MaxoPerf | Load testing NATS JetStream |
| Redis Streams | redis | Load test Redis Streams on MaxoPerf | Load testing Redis Streams |
Testing IBM MQ instead? See MQ and messaging testing.