Curator can be integrated with Netflix Exhibitor to achieve a live/updating list of the ZooKeeper ensemble. This means that your ZooKeeper client (i.e. Curator) will automatically/dynamically adjust to changes in the makeup of a ZooKeeper ensemble. Further, this support is generalized so that a service other than Exhibitor could be used if available.
The integration is enabled via the CuratorFrameworkFactory (or when constructing the CuratorZookeeperClient if not using the framework). Pass an EnsembleProvider to the ensembleProvider() method of the CuratorFrameworkFactory builder.
For Exhibitor, construct an instance of ExhibitorEnsembleProvider to pass to the builder. It takes a number of arguments:
Once configured, Curator will poll the Exhibitors for changes in the ensemble. If Curator should need to re-create the ZooKeeper instance (due to a SysDisconnected event, etc.) it will use the updated ensemble list to do so.