lwmqtt
lwmqtt copied to clipboard
Support MQTT version 5.0
This implements most of the important parts of MQTT v5 from a client's perspective. There are lots of things that can be done for completeness, but this does provide a lot of the essence of a useful implementation.
Known deficiencies:
- [ ] documentation is not updated
- [ ] 'AUTH' packets are not implemented
- [ ] properties are not managed everywhere possible (e.g., not every function returns a set)
- [ ] connection properties are inaccessible
- [ ] bit fields make Travis unhappy
There may be other issues (particularly naming things), but it's covering a lot of v5 ground.
Possible future work:
- allow server-side aliases (most brokers won't do this, but it's relatively easy)
- generate client-side aliases (mostly doable from a user application, but I made a helper to do it automatically in my haskell client)
See also: #8
Travis says your compiler doesn't like my bitfields. They're not critical to the API, they just make values smaller.
This could also be done with a bitmask (probably more easily), but types get a little blurry since QoS starts to mean slightly different things in different contexts.
Thanks for working on this! At a first glance the code looks very well written and meets the expected style. It will take me sometime to look into into it and read the spec myself. I'll get back to you ASAP.
Thanks. I intentionally left some imperfections so we'd have something to talk about.
But I've been using this on much of my embedded stuff (ESP32 and ESP8266) since I pushed this, and it's been pretty great. The APIs may not be ideal, but I've not found any operational problems yet.
I just rebased this against upstream master and tested every individual change to not introduce any test errors.
CI is still angry about bit fields. Kind of a weird thing to complain about, but I mentioned it above. I've been using it on ESP8266 and ESP32 for a couple of years now, though.
Thanks for the update! Unfortunately, I haven't yet found time to get into MQTT5. Hopefully I can look at this this winter. Sorry for the delay, but I'm happy to hear that it works!