fix MQTT v5 client conformance violations in native and wasm clients - #164
Merged
Merged
Conversation
This was referenced Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A client-side audit drove the real clients against a raw-byte fake broker for each of the 149 MQTT v5.0 normative statements that apply to a client. The native
MqttClientfailed about 40 MUST statements, and the wasm client had most of the same defects. All of them are fixed here, and each one is pinned by a test named after its OASIS statement ID.Native client (mqtt5 0.41.0)
$sharefilters, Topic Alias limits, Retain Available, Wildcard/Shared/SubId Available, Maximum Packet Size on SUBSCRIBE/UNSUBSCRIBE, and wildcard Response Topics.ConnectOptions::resume_existing_sessionoption lets a fresh client resume a broker-held session on purpose. The CLI--no-clean-start, the broker bridge and the in-process conformance client set it.Wasm client (mqtt5-wasm 1.5.0)
resumeExistingSessionoption. Thesession-recoveryandqos2-recoveryexamples are updated to use it.Breaking
resume_existing_sessionis set.ConnectOptionshas a new field.WebSocketConfig::with_tls_verificationandverify_tls.Tests
crates/mqtt5/tests/conf_client_{a,b,c,d}.rs: 137 tests.crates/mqtt5-wasm/tests/conformance_client.rs: 65 tests, run under Node through wasm-bindgen-test.cargo make ci-verifypasses. Clippy pedantic and fmt are clean.Versions: mqtt5 0.41.0, mqtt5-protocol 0.15.2, mqttv5-cli 0.28.8, mqtt5-wasm 1.5.0.