@daschl, when I start the application with Couchbase Server already running everything is fine, the connection is established at the beginning and if I stop the server and then run it again the client is reconnecting properly. I am looking for a solution that will work when I start the application without Couchbase Server ready. I need a mechanism that will periodically try to reconnect to Couchbase when I start app without it. In current situation SDK tries to connect few times at the beginning and then stops. When I turn on the CB server later client won’t connect. I don’t know if Couchbase SDK provide that mechanism out of the box, probably it’s something that I need to implement.
EDIT:
I think I will try to go with @Scheduled annotation.
@daschl, one more question, when I invoke Cluster.connect(…), it tries to reconnect multiple times, how to limit the amount of retries? RetryStrategy seems to not apply while reconnecting, is this a matter of proper timeouts?