tencent cloud

Query Messages
Last updated: 2025-08-11 10:53:54
Query Messages
Last updated: 2025-08-11 10:53:54

Scenarios

If message sending and receiving encounter exceptions or omissions, you can use the message query feature of the TDMQ for RabbitMQ console to view the message content and trace of a specified Vhost and Queue, making it easy to analyze and troubleshoot.

Use Instructions

Depending on the cluster type, the message query feature has discrepancies in use limits and query methods. You can click the next page tabs to view the appropriate description.
Open-Source Managed
Serverless Edition

Prerequisites

The Vhost for message querying has the Trace plugin enabled.


Implementation Principle Overview

After enabling the Trace plugin for a Vhost, the service component consumes the trace messages from the corresponding RabbitMQ cluster. After processing, the console can query message trajectories.

Use Limits

Message trace depends on the service component consuming trace messages. Since the service component is an underlying public service, it cannot guarantee timely consumption of high-volume RabbitMQ cluster trace messages. If trace messages accumulate, it can lead to issues such as high cluster memory load, thereby impacting RabbitMQ cluster stability.
Hence, it is not recommended to enable the Trace plugin in a production environment, especially in scenarios where the overall cluster (including ALL Vhosts) has a TPS exceeding 10000. Trace plugin recommendation is for low-traffic validation/troubleshooting scenarios.
Note:
Message query only supports querying messages with a size below 512KB.
Different query methods and limitations are as shown in the table below. Recommend using the suggested query method to enable more accurate results.
Query Method
Example
Limit
Query by time range and queue

Query up to 1000 messages in the selected queue within the specified time range, ordered by queue sequence.
Query by Routing Key
(Recommended)

Query up to 1000 messages by Routing Key in the selected queue within the specified time range.
Query by Routing Key, user/headers/body

Query up to 1000 messages by Routing Key in the selected queue within the specified time range, then filter by user/headers/body. The final number of queried messages will be less than or equal to 1000.
Query by time range and queue without Routing Key, then filter by user/headers/body
(Not Recommended)

Query up to 1000 messages in queue order within the selected queue and time range, then filter by user/headers/body. The final number of queried messages will be less than or equal to 1000.

Operation Steps

1. Log in to the TDMQ for RabbitMQ console.
2. Select Message Query in the left sidebar, select region and time range to be queried.
3. Select the cluster, Vhost, Queue, and time range you want to query. You can fill in the Routing Key, user, message headers, and body to narrow down the query scope.
4. Click Query, and the list below will display all queried results.

5. Locate the message you want to view content or detailed information, click View Message Details in the Action column to view detailed information as well as content (message body).

Use Limits

The message retention period for Serverless Edition defaults to 3 days, so only the messages within the last 3 days can be queried.

Operation Steps

1. Log in to the TDMQ for RabbitMQ console.
2. Select Message Query in the left sidebar, select region, set cluster, Vhost, Queue and time range you want to query, or enter message ID to narrow down the query scope.
3. Click Query, and the list below will display all queried results.

4. Locate the message you want to view content or detailed information, click View Message Details in the Action column to view detailed information as well as content (message body).


Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback