Skip to content

feat: add socket message ACK queue and reconnect replay - #159

Merged
Tybravo merged 1 commit into
SwiftChainn:mainfrom
Songu3020:feat-websocket-message-guarantees
Aug 28, 2026
Merged

feat: add socket message ACK queue and reconnect replay#159
Tybravo merged 1 commit into
SwiftChainn:mainfrom
Songu3020:feat-websocket-message-guarantees

Conversation

@Songu3020

Copy link
Copy Markdown
Contributor

#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:

@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@Tybravo
Tybravo merged commit 2ce17a9 into SwiftChainn:main Aug 28, 2026
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