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

Tracing RabbitMQ's ongoing activity

Sometimes, we need to trace all the messages that are being received and delivered by RabbitMQ, to analyze and debug unexpected application behavior.

RabbitMQ provides the so-called firehose tracing tool to have such information available.

The tracing activity can be enabled and disabled at runtime, and it should be used just for debugging since it imposes an overhead on the broker activity.

Getting ready

To run this recipe, we need RabbitMQ up and running and the Java client library.

How to do it...

RabbitMQ sends trace messages using the same mechanism used for log messages; so, the example code is very similar to the one of the previous recipe.

To consume trace messages, you can execute the Java main function

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