获取指定主题下的指定消息轨迹。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
rocketmq:GetTrace |
get |
*Topic
|
无 | 无 |
请求语法
GET /instances/{instanceId}/topics/{topicName}/traces/{messageId} HTTP/1.1
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
instanceId |
string |
是 |
待查询实例的 ID。 |
rmq-cn-zvp2vtypu05 |
topicName |
string |
是 |
待查询主题的名称。 |
linkedcare-image |
messageId |
string |
是 |
消息 id |
012A5AB0BBEC8A000104C6342B00001ECF |
startTime |
string |
否 |
||
endTime |
string |
否 |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
result |
||
requestId |
string |
请求 ID,每个请求的 ID 都是唯一的,可用于排查和定位问题。 |
7779A8FC-1BCD-5A1D-A603-C4A9BD8ADC49 |
success |
boolean |
执行结果是否成功。 |
true |
data |
object |
返回结果。 |
|
regionId |
string |
区域 ID。 |
cn-hangzhou |
instanceId |
string |
实例 ID。 |
rmq-cn-7e22ody**** |
topicName |
string |
主题名称。 |
topic_test |
messageInfo |
object |
消息信息。 |
|
regionId |
string |
区域 ID。 |
cn-beijing |
instanceId |
string |
实例 ID。 |
rmq-cn-u0t2ygjq505 |
topicName |
string |
主题名称。 |
Topic_normal_inspector |
messageId |
string |
消息 id |
0A79275A00207A4F0F2916C92F9A0B94 |
bornTime |
string |
生成时间 |
2023-03-22 12:17:08 |
storeTime |
string |
存储时间 |
2023-03-22 12:17:08 |
body |
string |
消息体。 |
{} |
bornHost |
string |
消息来自哪里。 |
x.x.x.x |
storeHost |
string |
消息存储位置 |
x.x.x.x |
messageType |
string |
消息类型。 |
NORMAL |
messageTag |
string |
标签列表。 |
xx |
messageGroup |
string |
以前的 shardingkey,顺序消息独有。 |
xx |
messageKeys |
array |
业务标识。 |
|
string |
业务标识。 |
xx |
|
userProperties |
object |
用户属性。 |
|
string |
用户属性。 |
xx |
|
transactionId |
string |
事务标识。 |
xx |
producerInfo |
object |
生产者轨迹信息。 |
|
records |
array<object> |
生产记录列表。 |
|
object |
生产记录列表。 |
||
userName |
string |
生产者名称。 |
xxx |
clientHost |
string |
主机名。 |
xx.xx.xx.xx |
produceTime |
string |
发送时间。 |
2023-03-22 12:17:08 |
produceDuration |
integer |
发送耗时。 |
100 |
produceStatus |
string |
发送状态。 |
SUCCESS |
arriveTime |
string |
到达时间。 |
2023-03-22 12:17:08 |
messageSource |
string |
消息来源。 |
CONSOLE |
dlqOriginTopic |
string |
死信队列主题。 |
test_topic |
dlqOriginMessageId |
string |
死信队列消息 ID。 |
0A79275A00207A4F0F2916C92F9A0B94 |
recallTime |
string |
撤回请求发起的时间。当 messageSource 为“recall”时,该字段非空。 |
空 | 2023-03-22 12:17:08 |
brokerInfo |
object |
Broker 轨迹信息。 |
|
presetDelayTime |
string |
预设投递时间。 |
2023-03-22 12:17:08 |
delayStatus |
string |
定时状态。 |
SUCCESS |
operations |
array<object> |
操作列表。 |
|
object |
操作列表。 |
||
operateType |
string |
操作类型。 |
ADD |
operateTime |
string |
操作时间。 |
2023-03-22 12:17:08 |
recallResult |
string |
撤回结果。当存在撤回记录时,该字段非空。 |
空 | RECALL_OK | RECALL_FAIL |
consumerInfos |
array<object> |
消费者轨迹信息。 |
|
object |
消费者轨迹信息。 |
||
consumerGroupId |
string |
消费组 ID。 |
GID_inspector_group |
records |
array<object> |
消费记录列表。 |
|
object |
消费记录列表。 |
||
userName |
string |
消费者名称。 |
test |
clientHost |
string |
主机名。 |
xx.xx.xx.xx |
fifoEnable |
boolean |
是否顺序消费。 |
true |
consumeStatus |
string |
消费状态。 |
SUCCESS |
operations |
array<object> |
操作列表。 |
|
object |
操作列表。 |
||
operateType |
string |
操作类型。 |
ADD |
operateTime |
string |
操作时间。 |
2023-03-22 12:17:08 |
invisibleTime |
integer |
不可见时间,毫秒。 |
100 |
deadMessage |
boolean |
是否为死信。 |
true |
popCk |
string |
POP_CK |
123 |
consumeStatus |
string |
消费状态。 |
SUCCESS |
deadMessage |
boolean |
是否为死信。 |
true |
deadLetterInfo |
object |
死信信息。 |
|
topicName |
string |
主题名称。 |
Register_Sync |
messageId |
string |
消息 ID。 |
7F000001001F7A4F0F29463F0376047D |
toDlqTime |
string |
到达死信队列时间。 |
2023-03-22 12:17:08 |
code |
string |
错误码。 |
InvalidConsumerGroupId |
message |
string |
错误信息。 |
The instance cannot be found. |
httpStatusCode |
integer |
HTTP 状态码。 |
200 |
dynamicCode |
string |
动态错误码。 |
InstanceId |
dynamicMessage |
string |
动态错误信息。 |
instanceId |
示例
正常返回示例
JSON
格式
{
"requestId": "7779A8FC-1BCD-5A1D-A603-C4A9BD8ADC49",
"success": true,
"data": {
"regionId": "cn-hangzhou",
"instanceId": "rmq-cn-7e22ody****",
"topicName": "topic_test",
"messageInfo": {
"regionId": "cn-beijing",
"instanceId": "rmq-cn-u0t2ygjq505",
"topicName": "Topic_normal_inspector",
"messageId": "0A79275A00207A4F0F2916C92F9A0B94",
"bornTime": "2023-03-22 12:17:08",
"storeTime": "2023-03-22 12:17:08",
"body": "{}",
"bornHost": "x.x.x.x",
"storeHost": "x.x.x.x",
"messageType": "NORMAL",
"messageTag": "xx",
"messageGroup": "xx",
"messageKeys": [
"xx"
],
"userProperties": {
"key": "xx"
},
"transactionId": "xx"
},
"producerInfo": {
"records": [
{
"userName": "xxx",
"clientHost": "xx.xx.xx.xx",
"produceTime": "2023-03-22 12:17:08",
"produceDuration": 100,
"produceStatus": "SUCCESS",
"arriveTime": "2023-03-22 12:17:08",
"messageSource": "CONSOLE",
"dlqOriginTopic": "test_topic",
"dlqOriginMessageId": "0A79275A00207A4F0F2916C92F9A0B94",
"recallTime": "空 | 2023-03-22 12:17:08"
}
]
},
"brokerInfo": {
"presetDelayTime": "2023-03-22 12:17:08",
"delayStatus": "SUCCESS",
"operations": [
{
"operateType": "ADD",
"operateTime": "2023-03-22 12:17:08"
}
],
"recallResult": "空 | RECALL_OK | RECALL_FAIL"
},
"consumerInfos": [
{
"consumerGroupId": "GID_inspector_group",
"records": [
{
"userName": "test",
"clientHost": "xx.xx.xx.xx",
"fifoEnable": true,
"consumeStatus": "SUCCESS",
"operations": [
{
"operateType": "ADD",
"operateTime": "2023-03-22 12:17:08",
"invisibleTime": 100,
"deadMessage": true
}
],
"popCk": "123"
}
],
"consumeStatus": "SUCCESS",
"deadMessage": true,
"deadLetterInfo": {
"topicName": "Register_Sync",
"messageId": "7F000001001F7A4F0F29463F0376047D",
"toDlqTime": "2023-03-22 12:17:08"
}
}
]
},
"code": "InvalidConsumerGroupId",
"message": "The instance cannot be found.",
"httpStatusCode": 200,
"dynamicCode": "InstanceId",
"dynamicMessage": "instanceId"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。