MQTT 5.0 support — guidance on how to structure the PR(s)? #8362
|
Hi maintainers 👋 I've implemented experimental, opt-in MQTT 5.0 support for Full diff (all commits): main...nberlee:nats-server:mqtt5-shared-subs Design principles
What's implemented (18 feature commits)Foundation (prerequisite for everything else)
PUBLISH properties
Flow control & size limits
Session / message lifecycle
Subscription options & properties
Topic Alias
Server niceties & the big one
Combined this is ~15k lines including tests, so I don't think a single squashed PR is the right call, hence this question. Note on 3 non-v5 commitsThe compare link currently also contains 3 MQTT 3.1.1 conformance bugfixes (packet-identifier reuse, pending-delivery leak on QoS 0 downgrade, and prompt redelivery on reconnect). Those are independent of v5 and I'm submitting them as separate standalone PRs; they'd be dropped from the v5 series. (#8358, #8359, #8360) How would you like this structured?A few options I can see, happy to do whichever fits your review process:
Dependencies to be aware of: the Foundation commit must land first; a few features build on earlier ones (e.g. Topic Alias server-side builds on the client-side property; server Receive Maximum builds on client Receive Maximum). Is this something you'd want upstream at all, and if so, which shape works best for you? Could the tracking issue be the closed Support MQTT v5 #3369 (and be reopend) or the broad Improve MQTT #6562 ? Thanks! |
Replies: 2 comments 1 reply
|
Appreciate the enthusiasm but I don't think we are likely to accept PRs for MQTT 5 support. MQTT is not our primary API surface, our primary concern is and will continue to be the NATS protocol. We have supported MQTT 3.1.1 as a simple bridging mechanism to help people move towards a NATS-native system (and will happily accept PRs that fix up 3.1.1 conformance or bugs) but I don't think we want to own the ongoing maintenance cost for the massive API surface increase that comes with MQTT 5 at this time. |
|
@nberlee would it be possible to implement this in an external bridge process, or is the functionality too intertwined with the nats-server? There is a lot of value in MQTT5 support, as industry is moving in that direction. |
Appreciate the enthusiasm but I don't think we are likely to accept PRs for MQTT 5 support.
MQTT is not our primary API surface, our primary concern is and will continue to be the NATS protocol. We have supported MQTT 3.1.1 as a simple bridging mechanism to help people move towards a NATS-native system (and will happily accept PRs that fix up 3.1.1 conformance or bugs) but I don't think we want to own the ongoing maintenance cost for the massive API surface increase that comes with MQTT 5 at this time.