O'Reilly logo

RabbitMQ Cookbook by Sigismondo Boschi, Gabriele Santomaggio

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Debugging RabbitMQ's messages

Sometimes, it is useful to just have an idea of the messages that are really traveling through a broker by just logging all of them to the standard output.

It is possible to trace those messages using a simple application provided with the RabbitMQ Java client.

Getting ready

To run this recipe, you need to have RabbitMQ up and running on the standard port 5672 and the RabbitMQ Java client library.

How to do it...

RabbitMQ includes a tracing utility in the Java client library that you can put in action by following these steps.

  1. Download the latest version of the RabbitMQ Java client library from http://www.rabbitmq.com/java-client.html.
  2. Unpack it and enter its directory.
  3. Run the Java tracer by running:
    ./runjava.sh com.rabbitmq.tools.Tracer ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required