All Products
Search
Document Center

:GetMessageDetail

Last Updated:Nov 28, 2024
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Obtains the details of a specific message.

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:GetMessageDetailget
*Topic
acs:rocketmq:{#regionId}:{#accountId}:instance/{#InstanceId}/topic/{#TopicName}
    none
none

Request syntax

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

Request parameters

ParameterTypeRequiredDescriptionExample
instanceIdstringYes

The instance ID.

rmq-cn-lbj31fs790d
topicNamestringYes

The topic name.

flink_test
messageIdstringYes

The message ID.

0A792FDB001F7591083D30ADB1DA11D5

Response parameters

ParameterTypeDescriptionExample
object

The result.

requestIdstring

The request ID.

FAEBD71F-E839-52F9-BD7B-8F1290525841
successboolean

Indicates whether the request was successful.

true
dataobject

The returned data.

regionIdstring

The region ID.

cn-hangzhou
instanceIdstring

The instance ID.

rmq-cn-7e22ody****
topicNamestring

The topic name.

topic_test
messageIdstring

The message ID.

01BE87E485F0C7808C04543CAF00000001
bornTimestring

The time when the message was generated.

2023-03-22 12:17:08
storeTimestring

The time when the message was stored.

2023-03-22 12:17:08
bodystring

The message body.

{}
bodySizeinteger

The size of the message body.

123
bornHoststring

The client on which the message was produced.

xxx.xx.xxx.xx
storeHoststring

The broker on which the message was stored.

xxx.xx.xxx.xx
messageTypestring

The message type.

NORMAL
messageTagstring

The tags.

xx
messageGroupstring

The sharding key. This parameter is returned only for ordered messages.

xx
messageKeysarray

The message keys.

messageKeystring

The message key.

xx
userPropertiesobject

The user attributes.

string

The user attribute.

xxx
systemPropertiesobject

The default system attributes.

string

The default system attribute.

xx
codestring

The error code.

Topic.NotFound
messagestring

The error message.

Parameter instanceId is mandatory for this action .
httpStatusCodeinteger

The HTTP status code.

200
dynamicCodestring

The dynamic error code.

InstanceId
dynamicMessagestring

The dynamic error message.

instanceId

Examples

Sample success responses

JSONformat

{
  "requestId": "FAEBD71F-E839-52F9-BD7B-8F1290525841",
  "success": true,
  "data": {
    "regionId": "cn-hangzhou",
    "instanceId": "rmq-cn-7e22ody****",
    "topicName": "topic_test",
    "messageId": "01BE87E485F0C7808C04543CAF00000001",
    "bornTime": "2023-03-22 12:17:08",
    "storeTime": "2023-03-22 12:17:08",
    "body": "{}",
    "bodySize": 123,
    "bornHost": "xxx.xx.xxx.xx",
    "storeHost": "xxx.xx.xxx.xx",
    "messageType": "NORMAL",
    "messageTag": "xx",
    "messageGroup": "xx",
    "messageKeys": [
      "xx"
    ],
    "userProperties": {
      "key": "xxx"
    },
    "systemProperties": {
      "key": "xx"
    }
  },
  "code": "Topic.NotFound",
  "message": "Parameter instanceId is mandatory for this action .",
  "httpStatusCode": 200,
  "dynamicCode": "InstanceId",
  "dynamicMessage": "instanceId"
}

Error codes

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