Project: springxd
Issue XD-1393: Support explicit client connect string for ZooKeeper
This will have an effect on both singlenode and distributed mode as described below... *singlenode:* Currently, when running in singlenode mode, an embedded ZooKeeper server is started, and it discovers an available port for client connections and exposes it via a getClientPort() method. With this change, IF a client connect string is provided explicitly, the embedded ZooKeeper server should not be started, but instead the client connection should be established using that explicitly provided connect string. SEE the "todo" comment above the `SpringApplicationBuilder admin` line within `SingleNodeApplication`. *distributed:* Currently, when running in distributed mode, the client connect string is hardcoded to `localhost:2181`. Obviously that is only a short term solution since a real-world distributed runtime would span multiple machines (including the ZooKeeper ensemble itself). That is also why the connect string must support a comma-delimited list of `host:port` values (for redundancy), but the constructor for `ZooKeeperConnection` that accepts a client connect string already supports that via the underlying `CuratorFramework` builder. With this change, a command-line argument for the client connect string will be passed into the `ZooKeeperConnection` constructor, within the configuration (e.g. SEE the "todo" statement within `ContainerServerApplication.DistributedZooKeeperConnectionConfiguration`).
Story points: 4