book
Article ID: 293163
calendar_today
Updated On:
Issue/Introduction
How to perform RabbitMQ Quorum Queue baseline performance testing
Background:
The RabbitMQ cluster can be limited by a number of factors, from infrastructure-level constraints (e.g. network bandwidth) to RabbitMQ configuration and topology to applications that publish and consume. As with every tuning scenario, monitoring, benchmarking, and measuring are required to find the best setting for the environment and workload
The PerfTest is a throughput testing tool for RabbitMQ. that can demonstrate the baseline performance of a RabbitMQ node or a cluster of the RabbitMQ nodes. PerfTest, which is based on the Java client and can be configured to simulate basic workloads and more advanced workloads as well. PerfTest uses the AMQP 0.9.1 protocol to communicate with a RabbitMQ cluster The PerfTest can simulate High Loads for various message sizes and queue types, including the quorum queues.
Quorum queues are designed for data safety and fault tolerance. In addition, they are durable, ordered delivery, and provide predictable performance. Quorum queues provide better synchronization of mirrored data and follow the best-in-class Raft algorithm for leader/follower patterns to read/write messages.
Resolution
To install the PerfTest, refer to the link for details. PerfTest can create queues using provided queue arguments, to customize queues.
Here are a couple of examples:
Create a queue with a length limit of 10.
java -jar perf-test.jar --queue-args x-max-length=10
Queue arguments can be provided, by separating the key/value pairs with commas
java -jar perf-test.jar \
--queue-args x-max-length=10,x-dead-letter-exchange=some.exchange.name
Several arguments can be used to create quorum queues, but PerfTest provides a --quorum-queue flag to do that:
java -jar perf-test.jar \
--quorum-queue --queue name
--quorum-queue is a shortcut for --flag persistent --queue-args x-queue-type=quorum --auto-delete false. Note a quorum queue cannot have a server-generated name, so the --queue argument must be used to specify the name of the queue(s).
References:
RabbitMQ Performance ToolCluster Sizing Case Study – Quorum Queues Part 1Cluster Sizing Case Study – Quorum Queues Part 2