x-cubed / event-store-client

JS client library for connecting to Event Store over TCP/IP
The Unlicense
71 stars 24 forks source link

Failed subscription handling #18

Closed joeywinsford closed 8 years ago

joeywinsford commented 8 years ago

Include a callback for failed subscription requests to allow consumers to retry subscribing

joeywinsford commented 8 years ago

To clarify, we've had issues when our ES cluster has gone down or restarted, and it will accept connections a few seconds before it is ready to accept subscriptions.

This callback allows us to catch when the server refuses a subscription retry at a later interval.

The .NET API includes logic for retrying in the client, however that's a larger change that should probably be addressed along with connection dropping and retrying, so we've kept the client naive in this change.

x-cubed commented 8 years ago

Thanks for the contribution!

Just fix up the spelling error and it's good to go.

x-cubed commented 8 years ago

Cool, thanks Joey