Querying Messages
Scenario
Query messages by message ID or queue for troubleshooting.
- If the body size of a message is greater than 3 KB, you can download the message after the query.
- Only messages in the current queue can be queried. Messages cannot be queried across queues.
- When querying messages by queue, you can query messages only within the persistent storage time range.
Query Mode |
Query Criteria |
Query Type |
Description |
---|---|---|---|
Query by message ID |
Messages ID |
Exact query |
Based on a message ID, you can exactly locate the corresponding message to obtain its attributes. |
Query by queue |
Queue+time range |
Range query |
Based on a queue and time range, you can obtain all the messages meeting the query criteria in batches. In this case, multiple messages are queried, causing difficulties in matching. |
Prerequisites
A queue has been created. The queue has at least one message.
Procedure
- Log in to the management console.
- Click in the upper left corner of the management console and select a region.
Select the same region as your application service.
- Click Service List, and choose Application > Distributed Message Service to open the DMS console.
- In the navigation pane, choose Queue Manager.
- Click the name of a queue for which you want to query the messages.
- On the queue details page, click the Message Query tab.
- Query messages in either of the following ways:
- Click Query by Message ID. Enter a message ID in the search box and press Enter. The queried message body and attributes are displayed.
When querying messages by message ID, you can only query messages in the chosen queue. Otherwise, the query fails and an error message is displayed, indicating that the specified message ID is invalid.
Table 2 Parameter description Parameter
Description
ID
Message ID.
Queue ID
Queue ID.
Message Body
Message body.
Message Attributes
List of attributes.
Message Tags
Message label.
Message Size
Message size.
Created
Date and time when a message was created.
Operation
This parameter is displayed only when the body size of a message is greater than 3 KB.
After the query, you can download the message, which will be automatically saved as a .txt file.
- Click Query by Queue. Specify the time range for query, and press Enter.
You can set the time range to 72 hours at most.
In the Operation column, click View Details to view the complete message bodies, IDs, and attributes.Table 3 Parameter description Parameter
Description
ID
Message ID.
Message Body
Message body.
Message Attributes
List of attributes.
Message Tags
Message label.
Message Size
Message size.
Created
Date and time when a message was created.
Operation
If the body size of a message is greater than 3 KB, you can download the message after the query.
The downloaded message will be automatically saved as a .txt file.
- Click Query by Message ID. Enter a message ID in the search box and press Enter. The queried message body and attributes are displayed.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot