LATEST VERSION: 3.6.5 - CHANGELOG
Pivotal RabbitMQ v3.x

Java Client Tools

The Java client distribution ships with some utility programs written using the Java client. This page documents how to use them.

These utility programs are contained within rabbitmq-client-tests.jar. This jar file also contains several small example programs for exercising the functionality of the RabbitMQ server. The source code for these examples is in the test/src folder in the source distribution. These are intended to be fairly self-explanatory and are not documented here.

The script runjava.{sh,bat} runs Java with the class path correctly configured for the examples, e.g. runjava.sh com.rabbitmq.examples.TestMain runs the TestMain functional tests.

PerfTest

PerfTest (formerly known as MulticastMain) is a performance testing tool. It starts up zero or more producers and consumers and reports the rate at which messages are sent and received, along with the latency (i.e. time taken for messages to pass through the broker).

PerfTest supports many command line flags. Invoke it with –help to see them:

runjava.sh com.rabbitmq.examples.PerfTest --help

Some examples:

runjava.sh com.rabbitmq.examples.PerfTest -a
Send transient messages without acknowledgement, 1 producer and 1 consumer.

runjava.sh com.rabbitmq.examples.PerfTest -c 1000
Similar, but with acknowledgments and confirms.

runjava.sh com.rabbitmq.examples.PerfTest -c 1000 -f persistent
…with acknowledgments, confirms and persistence.

runjava.sh com.rabbitmq.examples.PerfTest -y0 -p -u my-queue -s 1000 -C 1000000
Fill a pre-declared queue with 1M transient messages of 1kB each

runjava.sh com.rabbitmq.examples.PerfTest -x0 -y10 -p -u another-queue
Start 10 consumers from a predeclared queue, and no producers.

HTML Performance Tools

The HTML Performance Tools are a set of tools that can help you run automated benchmarks by wrapping around the PerfTest benchmarking framework. You can provide benchmark specs, and the tool will take care of running the benchmark, collecting results and displaying them in an HTML page. Learn more here

Tracer

There’s a very basic, very simple AMQP protocol analyzer in class com.rabbitmq.tools.Tracer. Invoke it with

runjava.sh com.rabbitmq.tools.Tracer listenPort connectHost connectPort

listenPort
port to listen for incoming AMQP connections on - defaults to 5673.

connectHost
hostname to use when making an outbound connection in response to an incoming connection - defaults to localhost.

connectPort
port number to use when making an outbound connection - defaults to 5672.