Hi On zookeeper session timeout due to some stopping the world long GC pause or zookeeper server outage, Ephemeral nodes on kafka broker and consumer should be recreated but in my test environment, handleNewSession() is not called.
My test scenario is, starting kafka broker locally and put a breakpoint somewhere to simulate long pause, and then, I expected handleNewSession() should be called, but it was not and I saw kafka broker zk registration is gone. Previously, to avoid this problem, I overrode zkclient implementation internally to replace createEphemeral() function call with Apache Curator's PersistentEphemeralNodes and for reinstating watchers, I implemented ConnectionStateListener to reinstate all watchers when RECONNECTED happens. Do you know why I cannot reproduce handleNewSession()? Thank you Best, Jae