Feat: add resilient subscription helpers with reconnection and gap recovery - #2007
Feat: add resilient subscription helpers with reconnection and gap recovery#2007MayurK-cmd wants to merge 1 commit into
Conversation
|
|
Thanks for this, but my instinct is that this it too opinionated for Kit. It's definitely too opinionated for I think this may be better off as an independent package outside of Kit, perhaps published as a Kit Plugin. |
|
Thanks for the feedback! Makes sense — I'll publish this as a community plugin instead and open a PR to kit-plugins to get it listed in the Community Plugins table. Appreciate the pointer to that repo. |
Add createResilientSubscription and coordinateSubscriptionRecovery utilities to help applications build robust WebSocket subscriptions that automatically reconnect on failure and recover from message gaps.
createResilientSubscription wraps a subscription factory with:
coordinateSubscriptionRecovery runs multiple recovery functions in parallel and collects any errors, useful for synchronizing catch-up logic across multiple subscriptions after network failures.
Both utilities include comprehensive JSDoc with usage examples and follow Kit conventions (functional composition, TypeScript strict mode, proper error handling).
Closes #1990
Testing: Manual integration tests conducted - all 4 test scenarios pass: