add cofigurable number of retries to get zookeeper connection