- Documentation
Message Queue for RabbitMQ
User Guide
Extension management
Use the Rabbitmq_tracing Extension
Extension management
Use the Rabbitmq_tracing Extension
Use the Rabbitmq_tracing Extension
The Message Queue for RabbitMQ supports the rabbitmq_tracing extension. It can track messages flowing in and out of RabbitMQ and saves log files of these messages for troubleshooting and debugging purposes.
In message middleware scenarios, message loss sometimes occurs. For example, the message producer successfully sends a message but the consumer does not receive it. Message loss can result from various factors. For example, logical errors caused by encoding or network connection issues. In these cases, a message tracing mechanism is needed to identify the specific cause of the message loss so as to facilitate debugging and troubleshooting.
The Message Queue for RabbitMQ provides message tracing through the rabbitmq_tracing extension. Once enabled and traced, the system automatically creates an Exchange in the backend. Each queue is automatically bound to this Exchange, and messages sent to these queues are logged in the Trace files. You can view the Trace files to check the tracking information of specific messages.
tip
- The message tracing function consumes some performance and storage space. The amount of storage consumed depends on the message volume. Ensure sufficient instance storage space before using rabbitmq_tracing. To prevent Trace logs from filling the disk, the message tracing feature continuously monitors disk usage and stops writing Trace logs when usage reaches 80%. You can delete unneeded Trace logs to free up disk space.
- We recommend that you disable the rabbitmq_tracing extension and clear related logs after troubleshooting. It helps to reduce performance impact and save storage space.
An instance has been created, and the rabbitmq_tracing extension has been enabled for the instance. For detailed steps, refer to Enable the extension. - Log in to the RabbitMQ Web UI page.
- Click Admin in the top navigation bar.
- Click Tracing in the right sidebar of the Admin tab.
-
- Enter the relevant parameters in the Add a new trace section on the page of Tracing
- Parameter descriptions are as follows:
-
- (Optional) Add trace for other nodes.
- Switch to another node in Node. Repeat step 2, and add trace for all other nodes.
tip
If the current RabbitMQ instance is a cluster version, you can create traces for all nodes.
- View created Trace list.
- After creating a trace, you can view the created trace list in the All traces section on Web UI page.
-
- When the trace log files store message logs, click the trace log file name in the Trace log files section to view the log content.
tip
If you no longer need these log details, click Delete to remove them.
-
- The log content of text.log is as follows.
-
- The log content of json.log is as follows.
-
Last updated: 2025.10.13 11:45:50