tencent cloud

Message Trace and Description
Last updated:2026-01-23 17:34:04
Message Trace and Description
Last updated: 2026-01-23 17:34:04
The message trace records the entire process of a message from the producer to the TDMQ for RocketMQ server and finally to the consumer, including the consumed time (accurate to microseconds), execution result, producer's IP address, and consumer's IP address in each phase.

Prerequisites

You have deployed services on the producer and consumer sides by referring to SDK Reference, and messages have been produced and consumed within the last 3 days.
If you use a gRPC client of 5.0 or later versions for message production and consumption, you do not need to enable the message trace feature separately on the client.
If you use a client of 4.x or a remoting client of 5.0 or later versions, you need to enable the message trace feature on the client. The specific example for enabling the message trace feature on the client is as follows:
For details about the client, see the community client description.
Producer Settings
Push Consumer Settings
Pull Consumer Settings
Spring Boot Starter Integration (2.2.2 and Later)
DefaultMQProducer producer = new DefaultMQProducer(namespace, groupName,
// Access control list (ACL) permissions.
new AclClientRPCHook(new SessionCredentials(AK, SK)), true, null);
// Instantiate a consumer.
DefaultMQPushConsumer pushConsumer = new DefaultMQPushConsumer(NAMESPACE,groupName,
new AclClientRPCHook(new SessionCredentials(AK, SK)),
new AllocateMessageQueueAveragely(), true, null);
DefaultLitePullConsumer pullConsumer = new DefaultLitePullConsumer(NAMESPACE,groupName,
new AclClientRPCHook(new SessionCredentials(AK, SK)));
// Set the NameServer address.
pullConsumer.setNamesrvAddr(NAMESERVER);
pullConsumer.setConsumeFromWhere(ConsumeFromWhere.CONSUME_FROM_LAST_OFFSET);
pullConsumer.setAutoCommit(false);
pullConsumer.setEnableMsgTrace(true);
pullConsumer.setCustomizedTraceTopic(null);
package com.lazycece.sbac.rocketmq.messagemodel;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
* @author lazycece
* @date 2019/8/21
*/
@Slf4j
@Component
public class MessageModelConsumer {

@Component
@RocketMQMessageListener(
topic = "topic-message-model",
consumerGroup = "message-model-consumer-group",
enableMsgTrace = true,
messageModel = MessageModel.CLUSTERING)
public class ConsumerOne implements RocketMQListener<String> {
@Override
public void onMessage(String message) {
log.info("ConsumerOne: {}", message);
}
}

}

Message Trace Query Result Description

The results queried using the message trace feature consist of three sections: message production, message storage, and message consumption.

Message Production

Parameter
Description
Production Address
Address and port number of the producer.
Production Time
Time when the TDMQ for RocketMQ server acknowledges receiving a message, accurate to milliseconds.
Sending Duration
Time used to send a message from the producer to the TDMQ for RocketMQ server, accurate to microseconds.
Production Status
Whether a message is produced successfully. If the status is failed, certain header data of the message may be lost during message sending, and the preceding fields may be null.

Message Storage

Parameter
Description
Storage Time
Message persistence duration.
Storage Status
Whether a message is persisted successfully. If the status is failed, the message fails to be saved to the disk. This may be caused by underlying disk damage or insufficient space. In such a case, you need to submit a ticket as soon as possible.

Message Consumption

Message consumption is presented in the form of a list. TDMQ for RocketMQ supports two consumption modes: clustering consumption and broadcasting consumption.
The following table describes the information displayed in the list.
Parameter
Description
Consumer Group Name
Name of a consumer group.
Consumption Mode
Consumption mode of a consumer group. Two modes are supported: clustering consumption and broadcasting consumption.
Number of Pushes
Number of times that the TDMQ for RocketMQ server delivers a message to the consumer.
Last Push Time
The last time the TDMQ for RocketMQ server delivered a message to the consumer.
Consumption End Time
Time when the TDMQ for RocketMQ server receives an acknowledgment message from the consumer.
Consumption Duration
Time interval from when the TDMQ for RocketMQ server sends a message to a consumer for the first time to when the TDMQ for RocketMQ server receives an acknowledgment message from the consumer.
Consumption Status
Pushed but not confirmed: The TDMQ for RocketMQ server has delivered a message to the consumer, but has not received an acknowledgment message from the consumer.
Confirmed: The consumer replies with an acknowledgment message to the TDMQ for RocketMQ server, and the server has received the acknowledgment message.
Acknowledgment timeout: The server has not received an acknowledgment message before the timeout and will redeliver the message.
Retried but not confirmed: The TDMQ for RocketMQ server has redelivered the message to the consumer, but has not received an acknowledgment message from the consumer.
Transferred to the dead letter queue: The message is delivered to the dead letter queue as it still failed to be consumed normally after a certain number of retries.
Note: If the consumption mode is broadcast consumption, the consumption status can only be Pushed but not confirmed.
Click the rightward chevron next to the subscription name to view the details of each message sent by the server.
Parameter
Description
Push Order
Number of times that the TDMQ for RocketMQ server delivers a message to the consumer.
Consumption Address
Address and port number of the consumer that receives a message.
Consumption Start Time
Time when the TDMQ for RocketMQ server delivers a message to the consumer.
Consumption End Time
Time when the TDMQ for RocketMQ server receives an acknowledgment message from the consumer.
Consumption Duration
Time interval from when the TDMQ for RocketMQ server sends a message to a consumer to when the TDMQ for RocketMQ server receives an acknowledgment message from the consumer.
Consumption Status
Pushed but not confirmed: The TDMQ for RocketMQ server has delivered a message to the consumer, but has not received an acknowledgment message from the consumer.
Confirmed: The consumer replies with an acknowledgment message to the TDMQ for RocketMQ server, and the server has received the acknowledgment message.
Acknowledgment timeout: The server has not received an acknowledgment message before the timeout and will redeliver the message.
Retried but not confirmed: The TDMQ for RocketMQ server has redelivered the message to the consumer, but has not received an acknowledgment message from the consumer.
Transferred to the dead letter queue: The message is delivered to the dead letter queue as it still failed to be consumed normally after a certain number of retries.
Page dead letter redelivery completed: On the dead letter queue redelivery page, the user has redelivered the message in the dead letter queue to the retry queue of the original queue.

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback