Message Delivery Overview
Introduction
Message delivery does not rely on product models. The platform provides one-way notifications for devices and caches messages. It delivers messages from the cloud to devices in asynchronous mode (without waiting for responses from devices). If a device is offline, data is sent after the device is online. The maximum cache duration is 24 hours. By default, the platform stores a maximum of 20 messages for each device. If the number of messages exceeds 20, subsequent messages will replace the earliest messages. In addition, messages can be delivered in the format of custom topics.
Topic Type |
Description |
---|---|
System topic |
The platform predefines topics for communications with devices. For details of the topic list and functions, see Topics. |
Custom topic |
Devices and the platform can communicate based on custom topics. Types of custom topics:
|
Scenarios
- The data format needs to be customized and does not rely on the product model.
- A large amount of data is frequently delivered.
Constraints
- Maximum size of a single message: 256 KB.
- A maximum of 20 messages can be cached for a single device.
- Maximum length of a custom MQTT topic: 128 bytes.
- The cache duration is configurable and cannot exceed 24 hours.
Quality of Service
- IoTDA supports MQTT QoS 0 and QoS 1, but does not support QoS 2.
- If the QoS of a topic is 0, the message is delivered only once without waiting for the device to return an ACK message. If the QoS of a topic is 1, the message delivery is successful only after the device returns an ACK message.
- Devices subscribe to the system topic whose QoS is 0 by default. If the downstream system topic whose QoS is 1 is required, devices need to be configured to subscribe to the topic.
- If a device needs to subscribe to a custom topic that does not start with $oc and the QoS is 1, submit a service ticket.
- If the QoS of the subscribed topic is 1 and the platform does not receive an ACK message from the device, the platform resends the message every 2 seconds for three times by default.
If the device still does not return an acknowledgment response and the message is still cached, the platform resends the message when the device goes online again or subscribes to a topic. By default, the platform resends the message every 10 seconds for five times.
In addition, the mechanism of resending every 2 seconds is triggered. Therefore, the device may receive duplicate messages. It is recommended that devices have deduplication mechanisms.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot