Spring boot properties to tune couchbase

Please let me know what should be correct spring boot properties to fine tune queryService in couchbase client. I am using spring-boot-starter-data-couchbase-reactive which uses couchbase-java-client 2.5.9 and couchbase-core-io 1.5.9

I am trying below properties but it is not working.

spring.couchbase.env.endpoints.queryservice.min-endpoints=5
spring.couchbase.env.endpoints.queryservice.max-endpoints=10
spring.couchbase.env.autorelease-after=5000

I can extend AbstractCouchbaseConfiguration to override properties but I would like to know if it is possible using spring boot properties.

I’m not sure if spring re-exports those system properties as env-variables but you can definitely use the standard properties that are picked up like this: “com.couchbase…” . But this only works for some properties, like the autorelease after

“com.couchbase.autoreleaseAfter” … you can either check out the documentation of the SDK or conveniently look in the source directly for which properties it works (again, scalars only): couchbase-jvm-core/src/main/java/com/couchbase/client/core/env/DefaultCoreEnvironment.java at master · couchbase/couchbase-jvm-core · GitHub

@subhashni might be able to help out on the spring specifics if there is a better way.

1 Like

Hi @suyashsharma04,

Which version of Spring boot are you using? These environment properties are available only since 2.1.0.