Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support MQTT version 5.0 #11

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

Support MQTT version 5.0 #11

wants to merge 26 commits into from

Conversation

dustin
Copy link

@dustin dustin commented Sep 21, 2019

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)

@dustin
Copy link
Author

dustin commented Sep 21, 2019

See also: #8

@dustin
Copy link
Author

dustin commented Sep 21, 2019

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.

@256dpi
Copy link
Owner

256dpi commented Sep 29, 2019

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.

@dustin
Copy link
Author

dustin commented Sep 30, 2019

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.

@dustin
Copy link
Author

dustin commented Oct 18, 2021

I just rebased this against upstream master and tested every individual change to not introduce any test errors.

@dustin
Copy link
Author

dustin commented Oct 18, 2021

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.

@256dpi
Copy link
Owner

256dpi commented Oct 25, 2021

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants