Interest in MQTT v5.0 client
Posted: Fri Oct 25, 2019 2:37 pm
I'd like to evaluate how much interest there is for having a MQTT v5.0 client for micropython.
I looked at the commit in paho.mqtt for CPython that added the support for 5.0 and it should be fairly possible to implement at least a subset of the features in micropython without making the library a lot bigger. (I'm talking about the async implementation mqtt_as by Peter Hinch as a basis, not umqtt.simple)
Features of MQTT 5.0 that might be interesting:
- Session Expiry interval (receive messages missed during a short reconnect but not hours old messages, replacement for clean_session)
- Message expiry: Allow an expiry interval to be set when a message is published.
- Shared Subscriptions: Add shared subscription support allowing for load balanced consumers of a subscription
- Topic Alias: Decrease the size of the MQTT packet overhead by allowing the topic name to be abbreviated to a small integer.
- Flow control: Allow the Client and Server to independently specify the number of outstanding reliable messages (QoS>0) they allow.
- User properties: Add User Properties to most packets. User properties on PUBLISH are included with the message and are defined by the Client applications. The user properties on PUBLISH and Will Properties are forwarded by the Server to the receiver of the message. (that would however increase code size and RAM demands significantly but can probably be implemented as an addon)
- Maximum Packet Size: Allow the Client and Server to independently specify the maximum packet size they support.
- Will delay: Add the ability to specify a delay between the end of the connection and sending the will message. This is designed so that if a connection to the session is re-established then the will message is not sent. This allows for brief interruptions of the connection without notification to others.
Features copied from https://github.com/mqtt/mqtt.github.io/ ... .1-and-5.0
I looked at the commit in paho.mqtt for CPython that added the support for 5.0 and it should be fairly possible to implement at least a subset of the features in micropython without making the library a lot bigger. (I'm talking about the async implementation mqtt_as by Peter Hinch as a basis, not umqtt.simple)
Features of MQTT 5.0 that might be interesting:
- Session Expiry interval (receive messages missed during a short reconnect but not hours old messages, replacement for clean_session)
- Message expiry: Allow an expiry interval to be set when a message is published.
- Shared Subscriptions: Add shared subscription support allowing for load balanced consumers of a subscription
- Topic Alias: Decrease the size of the MQTT packet overhead by allowing the topic name to be abbreviated to a small integer.
- Flow control: Allow the Client and Server to independently specify the number of outstanding reliable messages (QoS>0) they allow.
- User properties: Add User Properties to most packets. User properties on PUBLISH are included with the message and are defined by the Client applications. The user properties on PUBLISH and Will Properties are forwarded by the Server to the receiver of the message. (that would however increase code size and RAM demands significantly but can probably be implemented as an addon)
- Maximum Packet Size: Allow the Client and Server to independently specify the maximum packet size they support.
- Will delay: Add the ability to specify a delay between the end of the connection and sending the will message. This is designed so that if a connection to the session is re-established then the will message is not sent. This allows for brief interruptions of the connection without notification to others.
Features copied from https://github.com/mqtt/mqtt.github.io/ ... .1-and-5.0