The platform supports Standard MQTT Version 3.1.1. Please refer to the Protocol Specifications for details.
connect, subscribe, publish, ping, unsubscribe and disconnect messages are supported.
pubrec, pubrel and pubcomp messages are not supported.
The platform supports the following protocol features:
Feature | Supported or Not | Description |
---|---|---|
will | Not Supported | will and will retain flags must be set to 0, and will qos must be set to 0. |
session | Not Supported | cleansession flag must be set to 1. |
retain | Not Supported | The related flag must be set to 0. |
QoS0 | Supported | System topic messages received by device after successful subscription are all at QoS0. All messages published by device to system topic support QoS0 |
QoS1 | Supported | All messages published by device to system topic support QoS1 |
QoS2 | Not Supported |
Topics are conventionalized as follows:
The platform does not support user-defined topic and uses only system topic.
All system topics start with $.
Illegal use of topic
When a device subscribes to an illegal topic, the platform returns “Subscription Failed” by MQTT publish ack.
When a device publishes a message to an illegal topic, the platform will disconnect the device.
Wildcards: The platform supports wildcards + and #.
Note: The wildcards supported when using a system topic start only from the topic’s fourth level directory.
Subscriptions such as $sys/{pid}/{device-name}/#, $sys/{pid}/{device-name}/cmd/#, $sys/{pid}/{device-name}/cmd/request/+ are supported.
Subscriptions such as $sys/{pid}/#, $sys/#, # are not supported.
A device can subscribe to a message as follows:
Topic-based Subscribe | Effect |
---|---|
$sys/{pid}/{device-name}/dp/post/json/accepted | Subscribe to the message that device data points are reported successfully |
$sys/{pid}/{device-name}/dp/post/json/rejected | Subscribe to the message that reporting device data points failed |
$sys/{pid}/{device-name}/dp/post/json/+ | Subscribe to device data point reports |
$sys/{pid}/{device-name}/dp/post/json/accepted/+ | Subscribe to all command messages of the device |
$sys/{pid}/{device-name}/dp/post/json/rejected/+/+ | Subscribe to all command responses of the device |
$sys/{pid}/{device-name}/cmd/# | Subscribe to all command-related messages of the device |
$sys/{pid}/{device-name}/# | Subscribe to all relevant messages of the device |