Skip to content

Pause/Resume read from Socket - branch 5.0#262

Merged
vietj merged 1 commit intovert-x3:5.0from
dometec:5.0
Feb 17, 2026
Merged

Pause/Resume read from Socket - branch 5.0#262
vietj merged 1 commit intovert-x3:5.0from
dometec:5.0

Conversation

@dometec
Copy link
Contributor

@dometec dometec commented Jan 30, 2026

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.

@dometec dometec changed the title Pause/Resume read from Socket Pause/Resume read from Socket - branch 5.0 Jan 31, 2026
@vietj vietj added this to the 5.0.8 milestone Feb 9, 2026
@vietj
Copy link
Contributor

vietj commented Feb 9, 2026

@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

@dometec dometec force-pushed the 5.0 branch 3 times, most recently from 5b770a0 to f89c39b Compare February 13, 2026 09:23
@dometec
Copy link
Contributor Author

dometec commented Feb 13, 2026

@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.

@vietj
Copy link
Contributor

vietj commented Feb 13, 2026

@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.
@vietj vietj modified the milestones: 5.0.8, 5.0.9 Feb 16, 2026
@vietj vietj merged commit 841c4cb into vert-x3:5.0 Feb 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants