tencent cloud

消息队列 MQTT 版

动态与公告
新功能发布记录
产品简介
TDMQ 产品系列介绍与选型
什么是消息队列 MQTT 版
应用场景
技术架构
产品系列
MQTT 协议兼容说明
开源对比
高可用
产品约束与使用配额
基本概念
开服地域
购买指南
计费概述
续费说明
查看消费明细
欠费说明
退费说明
快速入门
入门流程指引
准备工作
公网接入
VPC 网络接入
用户指南
使用流程指引
配置账号权限
新建集群
管理 Topic
连接集群
查询消息
管理客户端
管理集群
查看监控和配置告警
数据集成
集成数据到云函数 SCF
集成数据到 CKafka
集成数据到 RocketMQ
开发指南
MQTT 5 高级特性
数据面 HTTP 接口说明
配置自定义域名
配置 SQL 过滤
配置点对点订阅
MQTT over QUIC
管理客户端订阅
消息增强规则
实践教程
MQTT 客户端开发注意事项
可观测能力
Topic 与通配符订阅
API 参考
History
Introduction
API Category
Making API Requests
Cluster APIs
Topic APIs
Authorization Policy APIs
User APIs
Client APIs
Message Enhancement Rule APIs
Message APIs
Data Types
Error Codes
SDK 参考
接入点格式
Java SDK
C SDK
Javascript/Node.JS/小程序
Go SDK
iOS SDK
JavaScript SDK
Dart SDK
Python SDK
.NET
安全与合规
权限管理
常见问题
相关协议
隐私协议
数据处理和安全协议
消息队列 MQTT 版服务等级协议
联系我们

DescribeMessageDetails

聚焦模式
字号
最后更新时间: 2026-01-13 21:49:33

1. API Description

Domain name for API request: mqtt.intl.tencentcloudapi.com.

This API is used to query the MQTT message details.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeMessageDetails.
Version Yes String Common Params. The value used for this API: 2024-05-16.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
InstanceId Yes String tencent cloud MQTT instance ID, obtained from the DescribeInstanceList api or console.
MessageId Yes String Message ID.
Subscription No String Subscription expression.

3. Output Parameters

Parameter Name Type Description
Body String Message body.
UserProperties Array of UserProperty Describes the user-customized attribute.
StoreTimestamp Integer Specifies the message storage time. millisecond-level timestamp.
MessageId String Message ID.
ClientId String Producer address.
Qos String Topic
OriginTopic String Specifies the source topic.
ContentType String Content type (MQTT5).
Indicates the content type of the message payload using standard MIME type format. helps the receiver correctly parse and process the message content.
Specifies the example.
application/json: indicates the payload is data in json format.
Text/Plain: indicates the payload is plain text.
application/octet-stream: indicates the payload is binary data.
PayloadFormatIndicator Integer Payload format indicator (MQTT5).
Indicates the payload format, which is a boolean value. 0 means an unspecified format (binary), and 1 means a UTF-8 encoded string.
Specifies the example.
Valid values: 0 indicates the payload is binary data, such as images or audio.
Valid value 1: when the payload is UTF-8 encoded text, such as JSON string or XML.
MessageExpiryInterval Integer Message expiration interval (MQTT5).
Specifies the validity time (in seconds) of the specified message before it is discarded. if the message fails to reach the MQTT server before expiration, it will be discarded.
Specifies the example.
The value 60 indicates that the message is valid within 60 seconds after release. unreached messages will be dropped after expiry.
A value of 0 indicates the message never expires and remains permanently valid until received or the session ends.
ResponseTopic String Response topic (MQTT5).
Specifies a topic for the response message in request-response mode. the sender can specify which topic the recipient should send the response to.
Specifies the example.
Sender publishes a request to the topic devices/device1/commands and sets ResponseTopic to devices/device1/responses.
Specifies the topic where the response is published after the recipient processes the request.
CorrelationData String Associated data (MQTT5).
Specifies the identifier used to associate a request and response, usually a byte array. in request-response mode, the sender sets this value, and the recipient includes the same value in the response so that the sender can identify the corresponding request.
Specifies the example.
The sender generates a unique ID (such as a byte[] of UUID) as CorrelationData and adds it to the request message.
The recipient includes the same CorrelationData in the response message. the sender compares this value to match the response and the request.
SubscriptionIdentifier String Subscription identifier (MQTT5).
Specifies the unique identifier assigned to the subscription, used to identify a specific subscription of the client. when sending a message to the client, the server can include this identifier to help with client identification of the corresponding subscription.
Specifies the example.
The client subscribes to the topic devices/+/temperature and sets SubscriptionIdentifier to 123.
When the server sends a message of this topic to the client, the message will contain SubscriptionIdentifier: 123. the client can know which subscription the message is sent through based on this value.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Example

This example shows you the example.

Input Example

POST / HTTP/1.1
Host: mqtt.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeMessageDetails
<Common request parameters>

{
    "InstanceId": "mqtt-g839agr2",
    "MessageId": "15397032005D639FEE4893603732005C"
}

Output Example

{
    "Error": null,
    "RequestId": null,
    "Response": {
        "Body": "this is body",
        "ClientId": "client1",
        "MessageId": "15397032005D639FEE4893603732005C",
        "OriginTopic": "home/room3",
        "Qos": "1",
        "RequestId": "ba5d5d6a-64c9-40cf-8889-21efed76389d",
        "StoreTimestamp": "1745828681259",
        "UserProperties": [
            {
                "Key": "key1",
                "Value": "value-1"
            },
            {
                "Key": "key2",
                "Value": "value-2"
            }
        ]
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
ResourceNotFound.Instance ResourceNotFound.Instance
ResourceNotFound.Message ResourceNotFound.Message

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈