Skip to content

Stop / Resume reading from Broker#3378

Draft
dometec wants to merge 4 commits into
smallrye:mainfrom
dometec:stop_resume_reading
Draft

Stop / Resume reading from Broker#3378
dometec wants to merge 4 commits into
smallrye:mainfrom
dometec:stop_resume_reading

Conversation

@dometec

@dometec dometec commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

This is a Draft PR since use vertx-mqtt compiled with vert-x3/vertx-mqtt#267 and vert-x3/vertx-mqtt#268 not released yet.

The first commit add a test to show the error where the application message buffer is full.

In the second commit I've added the logic to stop and restart the socket read when the buffer is going to be almost full.
Added also some documentation in receiving-mqtt-messages.md, I hope that clear the problem and the parameters usage.

The attirbutes "receive-buffer-size", "recv-bytebuf-allocator-size" have direction = INCOMING_AND_OUTGOING becouse are used by the mqtt client that can be common between incoming and outgoing channel.

@dometec

dometec commented Apr 28, 2026

Copy link
Copy Markdown
Contributor Author

I tested this feature with some private application module and it works well. I'll switch this PR in ready on the first release of verts-mqtt.

dometec added 4 commits June 26, 2026 08:10
Guard the buffer-driven pause() and resume() calls in ClientHolder with
isConnected(). Acting on a disconnected session is a no-op, and the paused
state could otherwise leak across a reconnect, leaving consumption stuck.
@dometec dometec force-pushed the stop_resume_reading branch from b5bed84 to b0c2f72 Compare June 27, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants