EMQ X 3.0, named "promise of Tomorrow", is a major release.
EMQ X 3.0 is the first release that supports MQTT 5 Protocol standard; meanwhile it is backward compatible with MQTT 3 (3.1 & 3.1.1)
Besides supporting MQTT 5, EMQ X 3.0 comes with more functional features. Performance and stability are also improved significantly after refactoring some core components.
The EMQ X 3.0 implements most features of MQTT 5 specification. New MQTT 5 features include:
New packet type.
In MQTT 5 there is new packet type AUTH for authentication exchange.
Clean session flag in MQTT 3 is now split to Clean Start Flag and a Session Expiry Interval.
Allow an expiry interval to be set when a message is published.
Reason code on all ACKs
All responding packet includes a reason code. The communication partner can know if a request is successful or failed with what reason.
Reason string on all ACKs
An optional reason string to reason code is allowed.
Now server can disconnect a connection.
Payload format and content type
Can specify the payload format and a MIME style content type when publishing.
Formalized request and response communication pattern.
EMQ X 2.x supports shared subscription on single-node as an unstandardized feature. Now in EMQ X 3.0, the shared subscription is cluster-wide.
With a subscription ID the client is able to know the message comes from which subscription.
Topic can can have an integer alias, this reduces the communication overhead.
User properties can be added in most packets.
Maximum packet size
Broker specified max packet size is implemented in EMQ X 2.x already, When a oversized message is received, it will be dropped, and the client will get disconnected without informed about the reason. Now in EMQ X 3.0, the broker can disconnect the MQTT connection with a reason code.
Optional Server feature availability
Define the allowed features of the broker and specify them to the client.
Provide subscription options primarily to allow for message bridge applications.
Allow to specify a delay between end of connection and sending the will message. This allows for brief interruptions of the connection without notification to others.
Server keep alive
Server can specify a keepalive value it wishes the client to use.
In case where the ClientID is assigned by the server, return the assigned ClientID.
Allow the server to specify an alternate server to use on CONNACK or DISCONNECT.
The clustering architecture is evolved. Now a single cluster is able to serve ten-millions of concurrent connections.
---------- ---------- | EMQX |<--- MQTT--->| EMQX | |--------| |--------| | Ekka |<----RPC---->| Ekka | |--------| |--------| | Mnesia |<--Cluster-->| Mnesia | |--------| |--------| | Kernel |<----TCP---->| Kernel | ---------- ----------
Ekka is introduced to auto-cluster EMQX, and to auto-heal the cluster after net-split, following clustering methods are now supported:
The rate limiting is introduced to make the broker more resilient, there are 2 kinds of configurations to control: