If you have questions about messages that are sent to ApsaraMQ for RabbitMQ, you can query the messages in the ApsaraMQ for RabbitMQ console. ApsaraMQ for RabbitMQ allows you to query messages by queue and by message ID. The query by queue method can be used in fuzzy search scenarios in which you have obtained the queue to which messages are sent but not the message IDs that are specified when messages are sent. The query by message ID method can be used in exact search scenarios in which you have obtained the message IDs that are specified when messages are sent.
Limits
ApsaraMQ for RabbitMQ allows you to query messages that are sent in the previous three days.
ApsaraMQ for RabbitMQ allows you to query up to 100 messages at a time.
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
In the upper-left corner of the Message Query page, click Change, select the vhost to which the message that you want to query belongs, and then click the Query by Queue tab.
In the Queue drop-down list, select the queue to which the message that you want to query belongs, configure the Time Range parameter, and then click Query.
Parameter
Description
ExchangeName
The name of the exchange that sent the message. The exchange is bound to the queue to which the message that you want to query belongs.
RoutingKey
The routing key specified when the message was sent. The exchange routes the message to the queue based on the routing key.
MessageID
The message ID. In most cases, a message ID is a business-specific attribute that is globally unique. If a message ID is not globally unique, you can find up to 64 messages with the same message ID in the query result.
StoreTime
The point in time when the message was stored in a queue after the message was sent to the queue.
Query by message ID
In the upper-left corner of the Message Query page, click Change, select the vhost to which the message that you want to query belongs, and then click the Query by Message ID tab.
In the Queue drop-down list, select the queue to which the message that you want to query belongs. In the Message ID field, enter the message ID that you specified when you sent the message, configure the time range parameter, and then click Query.
Download and resend a message
Download a message
Among the returned messages, find the message that you want to download and choose
in the Actions column.Resend a message
Among the returned messages, find the message that you want to resend and click Resend in the Actions column.
In the Note message, click OK.
References
For information about how to specify message IDs, see How do I specify a message ID?