Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # user >> DISCONNECTED and SESSION_EXPIRED events

Copy link to this message
Im new to zk and had some questions about connection loss events. From what
I understand when a ZK handle loses connection to the ZK cluster, the ZK
client's watch handler receives a DISCONNECTED event. If the connection is
lost for longer than the session timeout, the ZK client's watch handler
receives a SESSION_EXPIRED event and the handle is closed. If this is
correct, does the ZK client's watch handler receive the DISCONNECTED event
right after the client loses its connection to the cluster? When does the
client get the SESSION_EXPIRED event? Does it get it after the client
detects the session would have timed out or only after the client is able
to re-establish a connection to the ZK cluster?