All Products
Search
Document Center

:GetTrace

Last Updated:Nov 28, 2024

Queries the trace of a specific message in a specific topic.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
rocketmq:GetTraceget
*Topic
acs:rocketmq:{#regionId}:{#accountId}:instance/{#InstanceId}/topic/{#TopicName}
    none
none

Request syntax

GET /instances/{instanceId}/topics/{topicName}/traces/{messageId} HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
instanceIdstringYes

The instance ID.

rmq-cn-zvp2vtypu05
topicNamestringYes

The topic name.

linkedcare-image
messageIdstringYes

The message ID.

012A5AB0BBEC8A000104C6342B00001ECF

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

requestIdstring

The ID of the request. The system generates a unique ID for each request. You can troubleshoot issues based on the request ID.

7779A8FC-1BCD-5A1D-A603-C4A9BD8ADC49
successboolean

Indicates whether the call was successful.

true
dataobject

The data returned.

regionIdstring

The region ID.

cn-hangzhou
instanceIdstring

The instance ID.

rmq-cn-7e22ody****
topicNamestring

The topic name.

topic_test
messageInfoobject

The message information.

regionIdstring

The region ID.

cn-beijing
instanceIdstring

The instance ID.

rmq-cn-u0t2ygjq505
topicNamestring

The topic name.

Topic_normal_inspector
messageIdstring

The message ID.

0A79275A00207A4F0F2916C92F9A0B94
bornTimestring

Message born time.

2023-03-22 12:17:08
storeTimestring

Message store time.

2023-03-22 12:17:08
bodystring

Message body.

{}
bornHoststring

Message born host.

x.x.x.x
storeHoststring

Message store host.

x.x.x.x
messageTypestring

Message type.

NORMAL
messageTagstring

Message tag.

xx
messageGroupstring

Message grpup.

xx
messageKeysarray

Message keys.

messageKeystring

Message key.

xx
userPropertiesobject

Message user properties.

string

Message user properties.

xx
transactionIdstring

Message transaction id.

xx
producerInfoobject

Producer trace info.

recordsarray<object>

Producer record list.

recordobject

Producer record list.

userNamestring

Producer name.

xxx
clientHoststring

Client host.

xx.xx.xx.xx
produceTimestring

Producer time.

2023-03-22 12:17:08
produceDurationlong

Producer duration.

100
produceStatusstring

Producer status.

SUCCESS
arriveTimestring

Arrive time.

2023-03-22 12:17:08
messageSourcestring

Message source.

CONSOLE
dlqOriginTopicstring

Dead-letter queue topic.

test_topic
dlqOriginMessageIdstring

Dead-letter queue message ID.

0A79275A00207A4F0F2916C92F9A0B94
brokerInfoobject

Broker trace info.

presetDelayTimestring

Preset delivery time.

2023-03-22 12:17:08
delayStatusstring

Delay status.

SUCCESS
operationsarray<object>

Operation list.

operationobject

Operation list.

operateTypestring

Operation type.

ADD
operateTimestring

Operation time.

2023-03-22 12:17:08
consumerInfosarray<object>

Consumer trace info.

consumerInfoobject

Consumer trace info.

consumerGroupIdstring

The consumer group ID.

GID_inspector_group
recordsarray<object>

Consumer record list.

recordobject

Consumer record list.

userNamestring

Consumer name.

test
clientHoststring

Client host.

xx.xx.xx.xx
fifoEnableboolean

Whether to consume fifo.

true
consumeStatusstring

Consume status.

SUCCESS
operationsarray<object>

Operation list.

operationobject

Operation list.

operateTypestring

Operation type.

ADD
operateTimestring

Operation time.

2023-03-22 12:17:08
invisibleTimelong

Invisible time, milliseconds.

100
deadMessageboolean

Whether it is a dead letter message.

true
popCkstring

POP_CK

123
consumeStatusstring

Consume status.

SUCCESS
deadMessageboolean

Whether it is a dead letter message.

true
deadLetterInfoobject

Dead letter info.

topicNamestring

The topic name.

Register_Sync
messageIdstring

MessageId.

7F000001001F7A4F0F29463F0376047D
toDlqTimestring

Arrival time in the dead letter queue.

2023-03-22 12:17:08
codestring

The error code.

InvalidConsumerGroupId
messagestring

The error message.

The instance cannot be found.
httpStatusCodeinteger

The HTTP status code.

200
dynamicCodestring

The dynamic error code.

InstanceId
dynamicMessagestring

The dynamic error message.

instanceId

Examples

Sample success responses

JSONformat

{
  "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"
        }
      ]
    },
    "brokerInfo": {
      "presetDelayTime": "2023-03-22 12:17:08",
      "delayStatus": "SUCCESS",
      "operations": [
        {
          "operateType": "ADD",
          "operateTime": "2023-03-22 12:17:08"
        }
      ]
    },
    "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"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-10-10The response structure of the API has changedView Change Details
2024-09-19The internal configuration of the API is changed, but the call is not affectedView Change Details