MQTT 5

MQTT 5 New features

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.

Highlights of MQTT 5
check User attributes

Support user-defined attributes and transmission of additional custom information to expand more application scenarios.

check Topic alias

Reduce the overhead of MQTT messages by shortening the topic name to a small integer.

check Session expiration

Split the cleanup session flag into a new start flag and the session expiration interval can be modified when disconnected.

check Flow control

Allow the client and server to specify the number of outstanding reliable messages (QoS> 0) respectively.

check Message expiration

Allows messages to be published with an expiration interval.

check Maximum packet length

Allow the client and server to individually specify the maximum message lengths they support.

check Reason codes of all confirmation packets

All response packets contain reason codes so that the caller can determine whether the requested function was successful.

check Optional server function availability

Inform the client the feature list supported by the server to avoid the client using unsupported features.

check All confirmation message reason strings

Designed for problem location.

check Enhanced authentication

Provide a mechanism to enable challenge/response style authentication including mutual authentication.

check Server disconnection

The server is allowed to send a DISCONNECT message to indicate why the connection was closed.

check Subscription options

Provide subscription options that are primarily used to define applications allowing message bridging.

check Payload format and content type

Allows to specify payload format (binary, text) and MIME-style content types when publishing messages.

check Will delay

Provide the ability to delay the sending of the specified will message after the connection is interrupted.

check Request / response mode

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.

check Server keeps connected

Allow the server to specify the keep-alive values it wants the client to use.

check Shared subscription

Implemented in v3.1.1, adding support for shared subscriptions to allow load balancing for multiple subscription consumers.

check Assign client identifier

If the server has assigned a client identifier, this client identifier is returned to the client.

check Subscription identifier

Allows to specify a digital subscription identifier in the subscription packet and returns this identifier when the message is distributed.

check Server reference

Allows the server to specify a standby server.

MQTT 5 related tutorials
Introduction to MQTT 5.0
Introduction to MQTT 5.0

Four years after the MQTT 3.1.1 has been released and became the OASIS standard, MQTT 5.0 was released, which is a significant improvement and upgrade.

View
Clean Start and Session Expiry Interval - MQTT 5.0 new features
Clean Start and Session Expiry Interval

MQTT 5.0 Clean Start and Session Expiry Interval not only solve the legacy problems of Clean Session, but also extend the usage scenarios of the client.

View
Reason code and ACK - MQTT 5.0 new features
Reason code and ACK

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 Indicator and Content Type - MQTT 5.0 new features
Payload Format Indicator and Content Type

Payload Format Indicators and Content Type are two new properties introduced in MQTT 5.0.

View
Request Response - MQTT 5.0 new features
Request Response

MQTT 5.0 adds the Response Topic, and defines the interaction process for Request Response. This article will introduce this feature in an easy-to-understand way.

View
Shared subscription - MQTT 5.0 new features
Shared subscription

Shared subscription is a new feature introduced by MQTT 5.0 protocol, which is equivalent to the load balancing function of subscribers.

View
Subscription identifier and subscription options - MQTT 5.0 new features
Subscription identifier and subscription options

MQTT 5.0 brings many new features, this article will introduce the use of subscription identifier and subscription options, in an easy-to-understand way.

View
Flow control - MQTT 5.0 new features
Flow control

MQTT 5.0 brings many new features, this article will give an introduction to the use of the new feature "flow control" in an easy-to-understand way.

View
Enhanced authentication - MQTT 5.0 new features
Enhanced authentication

MQTT 5.0 adds a new feature enhanced authentication, which includes query/response style authentication can implement bi-directional authentication of the client and broker.

View