feat: add socket message ACK queue and reconnect replay - #159
Merged
Tybravo merged 1 commit intoAug 28, 2026
Merged
Conversation
|
@Songu3020 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
#closes
#147
Summary
This change ensures drivers do not lose critical messages when they are briefly offline or reconnect mid-session.
Work done
Added a socket message queue to hold unacknowledged outbound messages.
Required an ACK from the client before removing a queued message.
Flushed pending queued messages automatically when the driver reconnects.
Wired the ACK event into the socket lifecycle so reconnects are safe and reliable.
Added regression coverage for queue behavior and reconnect replay logic.
Why this matters
Previously, messages sent while a driver was disconnected or briefly offline could be lost because there was no queued retry or acknowledgment flow. This patch preserves message delivery guarantees and improves reliability for driver-facing updates.
Verification
I validated the fix with the relevant test suite: