Using a combination of Spring Boot 1.4.1.Release and Spring Data Couchbase 2.1.3.RELEASE, is there a way to prevent application startup failure if it cannot connect to couchbase?
Current behavior: Application cannot connect to couchbase on startup and exits.
The goal: Application would continue to start even though it cannot connect to Couchbase, use the timeout configurations in CouchbaseEnvironment, and continually try to connect in the background.
In Spring Boot, we can configure Spring JDBC to ignore failure on startup with spring.datasource.continue-on-error=true
. Any chance something like that coupled with a retry on failure exists in Spring Data Couchbase?
You can configure CouchbaseEnvironment
by overriding getCouchbaseEnvironment
using JavaConfig and try increasing the connect timeout. Is there a specific connection failure you are running into?
There isn't continue-on-error
property for spring-data-couchbase. This property is available on Spring Boot for relational JDBC and it is useful to ignore initialize failures such as failing to create tables and loading into data sources using scripts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With