Query messages in the ApsaraMQ for RabbitMQ console to troubleshoot issues. ApsaraMQ for RabbitMQ supports two query methods: by queue for fuzzy searches when you know the destination queue but not the message ID, and by message ID for precise searches.
Limitations
-
The query time for ApsaraMQ for RabbitMQ is limited to three days.
-
ApsaraMQ for RabbitMQ supports querying up to 100 messages.
Procedure
Log on to the ApsaraMQ for RabbitMQ console. In the left-side navigation pane, click Instances.
In the top navigation bar of the Instances page, select the region where the instance that you want to manage resides. Then, in the instance list, click the name of the instance that you want to manage.
-
In the left-side navigation pane, click Message Query.
Query by queue
-
On the Message Query page, click Change, select the vhost containing the messages you want to query, and then click the Query All Messages by Queue tab.
-
From the Queue drop-down list, select a queue, specify a Time Range, and then click Query.
Parameter
Description
ExchangeName
The name of the exchange that sent the message. The exchange is bound to the queried queue.
RoutingKey
The routing key specified when the message was sent. Messages are routed based on the match between this key and exchange-to-queue bindings.
MessageID
The message ID, typically a globally unique, business-specific attribute. If the message ID is not globally unique, the query can return up to 64 messages.
StoreTime
The time the message entered the queue.
Query by message ID
-
On the Message Query page, click Change, select the vhost containing the message you want to query, and then click the Query by Message ID tab.
-
From the Queue drop-down list, select the queue that contains the message, enter the message ID in the Message ID text box, specify a Time Range, and then click Query.
Download and resend messages
-
Download a message
In the list of returned messages, find the message to download. In the Actions column, choose .
-
Resend a message
-
In the list of returned messages, find the message to resend. In the Actions column, click Resend.
-
In the Note dialog box, click OK.
-
References
For more information about specifying a message ID, see How do I specify a message ID?.