Search code examples
spring-data-couchbase

Is it possible to connect multiple couchbase clusters using spring-data-couchbase?


I have a scenario where I need to connect to two buckets. Each bucket is in a different couchbase cluster. Is it possible to configure with two buckets which are in two different clusters?


Solution

  • It should be possible to define an additional Cluster bean, associated Bucket bean and CouchbaseTemplate. It is certainly possible with 2 buckets within the same cluster, so you could start from there: http://docs.spring.io/spring-data/couchbase/docs/current/reference/html/#couchbase.repository.multibucket