sproutsocial / nsq-j

Java client for the NSQ realtime distributed messaging platform
MIT License
73 stars 25 forks source link

DP-12: When all connections get stuck in a FAILED state, clear / reset them all so we don't intentionally drop subsequent publishing calls on the floor. #52

Closed blakesmith closed 2 years ago

blakesmith commented 2 years ago

Before our Publisher refactorings, the old client behavior used to ping / pong back and forth between the primary and failover, so that we'd never get stuck in a state where we weren't at least attempting to reconnect on subsequent publishing attempts.

This attempts to approximate that behavior by resetting all the connection states back to NOT_CONNECTED when everything is marked as FAILED.