Message traces
A message trace records the time and status at each node as a message travels from a producer through the ApsaraMQ for RabbitMQ server to a consumer. Query message traces to diagnose delivery issues.
Query methods
ApsaraMQ for RabbitMQ supports the following query methods:
-
By queue: query messages in a specific queue when the message ID is unknown.
-
By message ID: query a specific message by ID. Set a message ID.
-
By message processing duration: query messages by the time elapsed between delivery and acknowledgment.
Limitations
ApsaraMQ for RabbitMQ message traces have the following limitations:
-
Enable the message trace feature on your instance before querying traces.
NoteMessage trace support and the queryable time range depend on the instance configuration selected at creation time. To enable message traces on an existing instance, Upgrade or downgrade instance configurations.
-
You can query message traces from the last 3, 7, or 15 days, depending on your configuration.
For example, with 3-day retention and a current time of 10:45:18 on April 12, 2022, the earliest available trace is from 10:45:18 on April 09, 2022.
Prerequisites
-
The message trace feature is enabled on your instance.
-
Messages have been sent to or consumed from the ApsaraMQ for RabbitMQ instance.
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 Tracing.
-
On the Message Tracing page, select a vhost, and then choose a query method.
-
To query by queue: On the Query All Messages by Queue tab, select a queue, specify a Time Range, and then click Query.
-
To query by message ID: On the Query by Message ID tab, enter the message ID, specify a Time Range, and then click Query.
-
To query by message processing duration: On the By Message Processing Duration tab, select a queue, enter the processing duration in seconds, specify a Time Range, and then click Query.
-
-
In the query results, find the message you want to trace and click Trace Details in the Actions column.
On the Trace Details page, view the complete trace of the selected message.
The Trace Details page shows the following parameters.
Category
Parameter
Description
Basic information
vhost
The vhost of the message.
message ID
The ID of the message.
Production details
Arrival time
The time the message arrived at the ApsaraMQ for RabbitMQ server.
exchange
The exchange in ApsaraMQ for RabbitMQ that received the message.
routing key
The routing key used to route the message to the queue.
Producer IP
The IP address of the producer client.
Producer account
The Account ID of the producer (an Alibaba Cloud account or a RAM user) that sends messages to ApsaraMQ for RabbitMQ.
Enqueued result
N/A
The queue in ApsaraMQ for RabbitMQ to which the message was delivered.
Delivery details (Queue)
Delivery time
The time when the message was delivered to the queue.
Consumer IP
The IP address of the consumer client.
Consumer account
The account ID of the Alibaba Cloud account or RAM user that consumes messages from ApsaraMQ for RabbitMQ.
Consumption method
The method used to consume the message. Peak TPS in Billing.
autoAck
Whether the message was automatically acknowledged after consumption.
deliveryTag
The delivery sequence number assigned by the ApsaraMQ for RabbitMQ server when it pushes a message to a consumer.
consumerTag
The unique consumer client identifier, set by the ApsaraMQ for RabbitMQ client or auto-generated by the ApsaraMQ for RabbitMQ server.
Final result
The result of the message consumption.
Consumer response details
Response time
The time the client sent an acknowledgment.
Response method
The method used to acknowledge the message.
Response parameters
The parameters used in the acknowledgment.
Response result
The result of the acknowledgment.