MQTT is a lightweight IoT protocol for reliable, low-bandwidth device communication. MQTT 5.0 extends the protocol to improve scalability, interoperability, and device-cloud interactions.
Background
IoT Platform supports MQTT 5.0, MQTT 3.1.1, and MQTT 3.1.
IoT Platform provides a standard MQTT broker that supports server-side subscription, data forwarding, and the IoT Platform SDK for efficient cloud application development. For more information, seeServer-side subscription, Data forwarding, and Overview.
Limits
A registered device can connect to IoT Platform using only one protocol version. If a device connects over MQTT 5.0, it cannot switch to MQTT 3.1 or MQTT 3.1.1.
MQTT 5.0 features
MQTT 5.0 extends MQTT 3.1.1 with improved performance, scalability, and interoperability, without increasing resource consumption or reducing usability.
|
Feature |
Description |
|
Attach custom key-value properties to message headers, similar to HTTP headers. |
|
|
Replaces lengthy topic names with four-byte integer aliases to reduce bandwidth usage. |
|
|
Sets a time-to-live for session state after a device disconnects from the server. |
|
|
Sets a time-to-live for published messages so subscribers do not receive expired messages. |
|
|
Delivers a predefined message to subscribers when a device disconnects unexpectedly. |
|
|
Stores the latest published message on a topic for delivery to new subscribers. |
|
|
Distributes messages on a topic across multiple subscribers for load balancing. |
|
|
Provides fine-grained subscription controls to filter messages and reduce unnecessary traffic. |
|
|
Enables request-response communication over MQTT, similar to HTTP RPC calls. |
|
|
Declares the payload format of a message, enabling transparent forwarding and variable-format payloads. |
|
|
Adds connection feedback, refined error codes, and server-initiated disconnection for faster troubleshooting. |