spring-data-cassandra set consistency level

Total Post:21

 2444  View(s)
Rate this:
I am using spring-data-cassandra (1.3.1.RELEASE) to connect to a cassandra database. Is there a way to change the consistency level in spring-data-cassandra. By default it is level 1. But how to change that?
  1. Post:397

    Re: spring-data-cassandra set consistency level

    It is not possible to set a custom consistency level when using the CrudRepository Interface of spring-data-cassandra. There is an open issue :

    Reason is that the SimpleCassandraRepository which implements the methods of the interface calls the CassandraOperations methods without the WriteOptions parameter.

    My solution: I wrote a custom crudrepository implementation, in this I can set the consistency level on my own.


Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.