All, I currently broadcast an IgniteCallable in my cluster which opens connections to various resources, specifically Zookeeper via Apache Curator.
If the originating node (the client that launched the IgniteCallable) is stopped prematurely I see that Ignite will rightfully cancel the broadcast call within the cluster. This is all great but Apache Curator has a thread in the background watching Zookeeper. So when Ignite stops the IgniteCallable in the cluster the connection to Zookeeper is still open which is keeping ephemeral nodes from being deleted. I tried implementing logic to handle thread interrupts to close the zookeeper connection but it doesn't look like IgniteCallable is cancelled through interrupts. I looked through the Ignite code base and can't quite figure out how it is cancelling my IgniteCallable so that I can hook into the IgniteCallable life cycle. Long story short, how do I do resource/connection cleanup in an IgniteCallable when the client disconnects ungracefully, and the connection is held by a thread launched from within the IgniteCallable? Thanks