momentohq / client-sdk-javascript

Official JavaScript SDK for Momento Serverless Cache
Apache License 2.0
55 stars 20 forks source link

chore: increase topics reconnect delay to 500ms #1431

Closed anitarua closed 3 weeks ago

anitarua commented 3 weeks ago

Previously, discontinuities were never shown. Increases the delay for attempting to reconnect to 5 seconds to match the go sdk, which did show discontinuities after resubscribing.

I think increasing the delay gives the server a little more breathing room to figure out that a reconnect had occurred and to send a discontinuity message to indicate the stream may have been interrupted.

Just increases delay for resubscribing to 500ms. Discontinuities will be seen for network interruptions longer than the server message buffer (currently 5s).