Query message traces
A message trace is the complete trace information that is aggregated from the time, status, and other data of each relevant node in the process of sending a message from the producer to the MSMQ server and then to the consumer for consumption. This topic describes how to quickly query message traces.
Prerequisites
Your message has been sent from the producer.
Procedure
Log on to the SOFAStack console.
In the left-side navigation pane, choose Middleware > MSMQ > Message Trace.
Click Create Query Task. You can select one of the following query dimensions and enter the required information as prompted.
By Message ID: This method is an exact query, which is fast and recommend.
By Message Key: This method is a fuzzy search. A maximum of 64 message traces can be queried. This parameter is applicable only to scenarios in which you do not record the message ID but set a message key and the message key is distinguishable.
Query by Topic: This method is a range query. This method is suitable for scenarios in which the preceding message IDs and message keys are not available and the number of messages is small. This is because there are many messages within the time range and they are not distinguishable.
Click OK.
After the query task is created, you can view the created query task on the Message Trace page, and the task status is Query, indicating that the message trace cannot be viewed for the time being.
On the Message Trace page, click Refresh until the status changes to Query Completed. Click the Expand icon to view brief information about the trace, including the properties of the message itself and the receiving status.
Click View Trace to view the complete trace diagram, as shown in the following figure.

The trail map provides the following roles and related information:
Producer:
Sent: the timestamp when the message is sent from the producer.
Sending Time: the time in milliseconds that the producer calls the Send method to send messages.
Sending Status:
Sent: The message is sent and stored on the server.
Failed to Send: The message failed to be sent. The server does not store the message. You need to try again.
Scheduled message: The message is a scheduled or delayed message and has not reached the delivery time.
Transaction not committed: The message is a transactional message and has not been committed.
Transactional Rollback: The message is a transactional message and has been rolled back.
Topic:
Key: the business identifier of a message, which is set by the message producer and uniquely identifies a business logic.
Tag: The second-level message type. It is used to further distinguish the types of messages under a topic.
Consumer:
Time: the time consumed to execute the consumeMessage method after the message is pushed to the client.
Delivery Time: the timestamp when the consumer starts to consume the message by executing the consumeMessage method.
Consumption Status:
All successful: All deliveries of the message have been successfully consumed.
Partially successful: The message delivery fails to be consumed, or fails to be consumed and retried.
All Failed: All deliveries of the message fail to be consumed.
Not Consumed: The message has not been delivered to any consumer.
No consumption result is returned: The consumption method has not returned a result or is interrupted. As a result, the consumption result is not returned to the server.
Consumed: The message has been consumed.
Consumption failed: The message consumption method actively returns a failure flag, or the consumption method throws an exception.
To delete a query task, find the task on the Message Traces page, click Delete in the Actions column, and then delete the task as prompted.
Unitization Description
In the LDC unit architecture, you can select a unit to create a message query task, as shown in the following figure.

In the message trace, you can also obtain the zone information of the producer, topic, and consumer, as shown in the following figure.
