Pause/Resume read from Socket - branch 5.0#262
Merged
vietj merged 1 commit intovert-x3:5.0from Feb 17, 2026
Merged
Conversation
vietj
reviewed
Jan 30, 2026
vietj
reviewed
Feb 4, 2026
vietj
reviewed
Feb 4, 2026
vietj
reviewed
Feb 6, 2026
vietj
reviewed
Feb 6, 2026
vietj
reviewed
Feb 6, 2026
Contributor
|
@dometec this looks good to me, can you squash in a single commit and provide a complete commit message that follows the format: What it does Motivation: XXX Changes: XXX |
5b770a0 to
f89c39b
Compare
Contributor
Author
|
@vietj I've reduced the pause on test. However the CI here in github failed becouse the old testcontainer version used. I add a commit just to update testcontainer. Let me know you you prefere a distinct PR. |
Contributor
|
@dometec can you rebase on latest branch ? this has been fixed |
Motivation: The ability to pause reading from the socket to avoid being overwhelmed by QoS 0 messages during traffic spikes. When reading is paused, incoming data accumulates in the TCP receive buffer. As the buffer fills up, the TCP stack advertises a reduced window size (eventually a zero window) to the broker, applying backpressure at the TCP level. At that point, outgoing data may accumulate in the broker’s socket send buffer until its limits are reached. Depending on the broker’s implementation and configuration, QoS 0 messages that cannot be written may be buffered or dropped. Changes: Implement new pause/resume methods that delegate to the corresponding NetSocketInternal methods.
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.
PR for the old #6 :) linked with PR #261
I want to pause reading from the socket to avoid being overwhelmed by QoS 0 messages.
When reading is paused, incoming data accumulates in the TCP receive buffer. As the buffer fills up, the TCP stack advertises a reduced window size (eventually a zero window) to the broker, applying backpressure at the TCP level.
At that point, outgoing data may accumulate in the broker’s socket send buffer until its limits are reached. Depending on the broker implementation and configuration, QoS 0 messages that cannot be written may be buffered or dropped.