You need to enable JavaScript to run this app.
Message Queue for RabbitMQ

Message Queue for RabbitMQ

Copy page
Download PDF
Extension management
Use the Rabbitmq_tracing Extension
Copy page
Download PDF
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.​
Background information​
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.​
Prerequisites​
An instance has been created, and the rabbitmq_tracing extension has been enabled for the instance. For detailed steps, refer to Enable the extension.​
Operation Steps​
  1. Log in to the RabbitMQ Web UI page.​
  1. Add a trace.​
  1. Click Admin in the top navigation bar.​
  1. Click Tracing in the right sidebar of the Admin tab.​
  • ​​​
  1. Enter the relevant parameters in the Add a new trace section on the page of Tracing ​
  • Parameter descriptions are as follows:​
  • ​
    Parameter​
    Description​
    Name​
    Name of the new trace. This name is used to distinguish different traces.​
    Format​
    Output message log format. Supported formats:​
    • Text: (recommended) text format, information displayed plainly for easy reading in WebUI.​
    • JSON: JSON format encoded in Base64. It is convenient for parsing after export.​
    Tracer connection username​
    Create username for the trace. This should be the username of the WebUI admin user. You can find it on the Instance Information page. For detailed instructions, see View Instance Information.​
    Tracer connection password​
    User password for creating the trace. This should be set as the user password of WebUI administrator. If forgotten, you can reset it on the instance's Instance Information page. For detailed instructions, see Reset Administrator User Password.​
    Max payload bytes​
    The maximum limit of the payload field in the trace file. Messages in the payload field will be truncated if exceeded. Unit: Byte. Optional.​
    For example, if Max payload bytes is set to 5, when the producer sends original message "Hello Worl!" to the RabbitMQ instance and it is delivered to the consumer, the backend service records it in the trace file truncated as “Hello”.​
    Pattern​
    Message tracing mode. Supported settings are as follows:​
    • #: Trace all messages, including all messages flowing in or out of the RabbitMQ instance.​
    • publish.#: Trace only the records of the sender and log only all messages flowing into the RabbitMQ instance.​
    • publish.myExchage: Trace only messages entering the specified Exchange. Here, myExchage is the Exchange name; please modify it according to your actual situation.​
    • deliver.#: Trace only processing records of receivers and log all messages flowing out of the RabbitMQ instance.​
    • deliver.myQueue: Track messages leaving the specified queue. The myQueue is the queue name. Please change it according to your actual needs.​
    ​
  • ​​​
  1. Click Add trace.​
  1. (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.​
  1. View created Trace list.​
  • After creating a trace, you can view the created trace list in the All traces section on Web UI page.​
  • ​​​
  1. View trace log files.​
  • 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