Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

MQTT 5 support #157

Open
lupine opened this issue Mar 27, 2023 · 4 comments
Open

MQTT 5 support #157

lupine opened this issue Mar 27, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@lupine
Copy link
Contributor

lupine commented Mar 27, 2023

Extracted out of #154

In that PR, we add retained messages for holding registers. If lxp-bridge is offline for a long time, these might become annoying.

MQTT 5 fixes this by adding a TTL to retained messages, so they disappear if not refreshed for a period. We could probably make use of this to solve that issue.

MQTT 5 implies upgrading rumqtt https://bytebeam.io/blog/rumqtt-r19-persistence-10k-load-and-public-infra/#%F0%9F%A7%AD-mqtt-5-roadmap and ruby-mqtt, at a minimum.

Do we want to retain (ahahaha) mqtt v3 support at the same time, opportunistically upgrading to v5 if the broker supports it? Looks like mosquitto 1.x supports mqtt v5, so it might be overkill to do so.

@celsworth celsworth added this to the v0.10 milestone Apr 3, 2023
@celsworth
Copy link
Owner

I'm not sure of the exact status of MQTT5 in the rumqttc crate. There's ongoing PRs that appear to be adding functionality, but the Github README only lists MQTT3 as "complete" so I guess MQTT5 is at-your-own-risk for now : https://github.com/bytebeamio/rumqtt#-rumqttc

And I'm struggling to find much documentation on how to use it, other than adding in a few ::v5 namespaces into the modules we include. There's not many resulting errors to fix, to be fair - seems like topic has changed from a String to Bytes (or Vec[u8] or something), and Publish now has two args rather than one, but nothing insurmountable.

I'm wondering if I'd rather wait for it to become more stable and documented, indicating some level of confidence in using it. It will end up holding up v0.10 though if we want to get this retain TTL in.

@lupine
Copy link
Contributor Author

lupine commented Apr 3, 2023

I don't think this one is super-important for v0.10 personally, it could come after.

@celsworth
Copy link
Owner

Fair enough, I'll bump the milestone. Reckon v0.10 is good for release then?

@celsworth celsworth modified the milestones: v0.10, v0.11 Apr 3, 2023
@lupine
Copy link
Contributor Author

lupine commented Apr 5, 2023

Yeah, I'd say so 👍

@celsworth celsworth added the enhancement New feature or request label Apr 26, 2023
@celsworth celsworth removed this from the v0.11 milestone Aug 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants