MQTT 5.0 has made major changes based on MQTT 3.1.1 and is not backward compatible.
MQTT 5.0 supports many new features. EMQ X Broker supports MQTT 5.0 protocol from version 3.0. It is the first broker in the open source community to support the protocol specification and is fully compatible with MQTT V3.1 and V3.1.1 protocols.
Support user-defined attributes and transmission of additional custom information to expand more application scenarios.
Reduce the overhead of MQTT messages by shortening the topic name to a small integer.
Split the cleanup session flag into a new start flag and the session expiration interval can be modified when disconnected.
Allow the client and server to specify the number of outstanding reliable messages (QoS> 0) respectively.
Allows messages to be published with an expiration interval.
Allow the client and server to individually specify the maximum message lengths they support.
All response packets contain reason codes so that the caller can determine whether the requested function was successful.
Inform the client the feature list supported by the server to avoid the client using unsupported features.
Designed for problem location.
Provide a mechanism to enable challenge/response style authentication including mutual authentication.
The server is allowed to send a DISCONNECT message to indicate why the connection was closed.
Provide subscription options that are primarily used to define applications allowing message bridging.
Allows to specify payload format (binary, text) and MIME-style content types when publishing messages.
Provide the ability to delay the sending of the specified will message after the connection is interrupted.
Specify the MQTT request / response mode, provide the response topic and compare data attributes, and control the response message to be routed back to the request publisher.
Allow the server to specify the keep-alive values it wants the client to use.
Implemented in v3.1.1, adding support for shared subscriptions to allow load balancing for multiple subscription consumers.
If the server has assigned a client identifier, this client identifier is returned to the client.
Allows to specify a digital subscription identifier in the subscription packet and returns this identifier when the message is distributed.
Allows the server to specify a standby server.
With the advent of the 5G era, the great vision of the IoT is becoming a reality. The number of connected IoT devices has reached 7 billion in 2018.View
MQTT protocol transmits application messages over the network. When application messages are transmitted over MQTT, they have an associated quality of service (QoS) and topic (Topic).View
When the client disconnects, a will message is sent to the relevant subscriber.View
Shared subscription is a new feature introduced by MQTT 5.0 protocol, which is equivalent to the load balancing function of subscribers.View
MQTT protocol specifies the quality of service, which guarantees the reliability of message delivery under different network environments.View
Clean Start and Session Expiry Interval in MQTT V5.0 are not unfamiliar to those who have experience in using MQTT v3.1.1 protocol.View
Although the publish-subscribe model fully decouples the publisher of the message from the subscriber, there is also an implicit problem that the subscriber cannot actively request the message from the publisher, and when the subscriber receives the message depends entirely on the publisher.View
Compared with MQTT 3.1.1, MQTT 5.0 protocol adds many properties, which are distributed in variable headers and payloads of packet.View
MQTT v3.1.1 protocol has only 10 return codes. These return codes can represent little meaning, and the same return code value can have different meanings in different messages.View
Payload Format Indicators and Content Type are two new properties introduced in MQTT 5.0.View
MQTT is completely different from Kafka. MQTT is a protocol and a technical standard developed by members (mostly are top engineers at IBM and Microsoft) of the OASIS Technical Committee.View