node-zookeeper icon indicating copy to clipboard operation
node-zookeeper copied to clipboard

How can I listen to the connection state changes events?

Open fstonezst opened this issue 6 months ago • 21 comments

Users of the LeaderSelector must pay attention to any connection state changes. If an instance becomes the leader, it should respond to notification of being SUSPENDED or LOST. If the SUSPENDED state is reported, the instance must assume that it might no longer be the leader until it receives a RECONNECTED state. If the LOST state is reported, the instance is no longer the leader and its leader task should exit.

fstonezst avatar Aug 19 '24 09:08 fstonezst