johnwlockwood / txnats

Use @nats.io with twisted
MIT License
7 stars 4 forks source link

Add ability to reconnect upon an unclean lost connection #14

Closed johnwlockwood closed 7 years ago

johnwlockwood commented 8 years ago

Implement event dispatching to event subscribers. Add example of using this to reconnect upon a lost connection. Removes most of the logging, since an event subscriber is better. Organize code more. mostly addresses #11. The reconnecting is done in an example for now.

johnwlockwood commented 8 years ago

Check it out @mackeyja92. Let me know what you think.

johnwlockwood commented 8 years ago

I want to work on connecting error handling, to implement an exponential backoff retry. And deal with when there are too many outstanding pings.

jared-mackey commented 8 years ago

@johnwlockwood LGTM

Edit:

I think creating an event for too many outstanding pings would be really good. Also, the exponential back off would be nice if it were easily configurable.