fix: bound queued incoming QoS 0 publishes - #96
Closed
hugues bouvier (huguesBouvier) wants to merge 1 commit into
Closed
fix: bound queued incoming QoS 0 publishes#96hugues bouvier (huguesBouvier) wants to merge 1 commit into
hugues bouvier (huguesBouvier) wants to merge 1 commit into
Conversation
Cap queued QoS 0 publishes with permits while leaving QoS 1 and 2 under MQTT protocol flow control. Excess QoS 0 messages are dropped without blocking connection progress. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Author
|
Vendored SDK mirror is open at Azure/iot-operations-sdks#1437. This source PR is fully green; the mirror PR local Rust checks pass, while its secret-dependent integration jobs require a maintainer-owned branch because it originates from a fork. |
Collaborator
|
As discussed offline, we can take this on the vendored version for now, and spend some time considering how to best fix this for the full version here. |
Collaborator
|
Moved to track in #105 |
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.
Summary
Context
The incoming application-message channel is unbounded. QoS 1/2 traffic is constrained by MQTT Receive Maximum and packet identifiers, but QoS 0 has no protocol-level flow control. If an application stops draining
Receiver, QoS 0 publishes can accumulate until the process runs out of memory.This was observed while investigating Azure-NBC PR 16518887. The permit is carried with each queued QoS 0 publish and released when the receiver drains or drops it, preserving message order without blocking socket progress.
Validation
make checkmake test