tencent cloud

TDMQ for MQTT

Release Notes and Announcements
Release Notes
Product Introduction
TDMQ Product Series Introduction and Selection
What Is TDMQ for MQTT
Scenarios
Technical Architecture
Product series
MQTT Protocol Compatibility Notes
Comparison with Apache
High Availability
Product Constraints and Usage Quota
Basic Concepts
Supported Regions
Billing
Billing Overview
Renewal Instructions
Viewing Consumption Details
Overdue Payment Instructions
Refund
Getting Started
Guide for Getting Started
Preparations
Public Network Access
VPC Network Access
User Guide
Usage Process Guide
Configuring Account Permission
Creating a Cluster
Managing Topic
Connecting to the Cluster
Querying Messages
Managing Client
Managing a Cluster
Viewing Monitoring Metrics and Configuring Alarm Policies
Data Integration
Integrating Data Into SCF
Integrating Data Into CKafka
Integrating Data into RocketMQ
Development Guide
MQTT 5 Advanced Features
Data Plane HTTP API Description
Quota and Flow Control Mechanism Description
Configuring a Custom Domain Name
Configuring SQL Filtering
Configuring Point-to-Point Subscription
MQTT over QUIC
Managing Client Subscription
Message Enhancement Rule
Use Cases
Must-Knows for MQTT Client Development
Observability
Topic and Wildcard Subscriptions
​​API Reference
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 Reference
Access Point Format
Java SDK
C SDK
Javascript/Node.JS/Mini Program
Go SDK
iOS SDK
JavaScript SDK
Dart SDK
Python SDK
.NET
Security and Compliance
Permission Management
FAQs
Related Agreement
Privacy Policy
Data Privacy And Security Agreement
TDMQ for MQTT Service Level Agreement
Contact Us

DescribeMessageDetails

PDF
Focus Mode
Font Size
Last updated: 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

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback