From sgcWebSockets 4.3.1, MQTT 5.0 is supported.
New version adds several improvements over 3.1.1 version:
- Improved error reporting (Reason Code & Reason Name).
- Message expiration to prevent clients from receiving stale/irrelevant information.
- Server Brokers can tell clients to re-connect to other broker servers.
- Extensibility mechanisms including user properties, payload format and content type.
- Enhanced authentication mechanism.
To implement all these features, new methods and events have been modified/added.
Basically methods are backward compatible with 3.1.1, so there is no need to change your code. New properties have been implemented in overloaded methods or as parameters with default values.
Events have been modified, so must been re-created again with new parameters. Basically, now events have as new parameters: ReasonCode and ReasonName which inform about packet state. And There is a new parameter with message properties.