What does an Apache Curator "connection string" look like?

Ztyx picture Ztyx · May 9, 2015 · Viewed 7.4k times · Source

How does the connection string given to CuratorFrameworkFactory#newClient look like? So far I haven't found any information on the web and the JavaDoc doesn't tell me the correct format.

Answer

Ztyx picture Ztyx · May 10, 2015

According to this post, it is of the format

IP1:PORT1,IP2:PORT2,...,IPn:PORTn

. For example:

127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183,127.0.0.1:2184