擷取指定主題下的指定訊息軌跡。
調試
您可以在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 |
否 |
開始時間 |
2023-05-10 10:42:11 |
| endTime |
string |
否 |
結束時間。 |
2024-09-09 09:00:00 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
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 |
| liteTopicName |
string |
輕量主題名稱 |
abc |
| 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> |
消費者軌跡資訊。 |
|
|
array<object> |
消費者軌跡資訊。 |
||
| consumerGroupId |
string |
消費組 ID。 |
GID_inspector_group |
| records |
array<object> |
消費記錄列表。 |
|
|
array<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",
"liteTopicName": "abc"
},
"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"
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。