---
title: "spring-data-cassandra set consistency level"  
description: "spring-data-cassandra set consistency level"  
author: "Anonymous User"  
published: 2015-11-29  
updated: 2015-11-30  
canonical: https://www.mindstick.com/forum/33660/spring-data-cassandra-set-consistency-level  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# spring-data-cassandra set consistency level

I am using [spring](https://www.mindstick.com/forum/33718/spring-social-facebook-oauth-getting-not-all-data-with-api-v2-5)-[data](https://www.mindstick.com/articles/13050/salesforce-aiming-to-dominate-predictive-analytics-with-data-science)-cassandra (1.3.1.RELEASE) to [connect](https://www.mindstick.com/articles/12810/how-to-connect-tablet-to-external-monitor-or-flat-screen-tv-using-computer-adapters) to a cassandra database. Is there a way to change the [consistency](https://www.mindstick.com/interview/215/what-is-acid-properties-in-transaction) level in spring-data-cassandra. By [default](https://www.mindstick.com/interview/12771/what-is-the-importance-of-default-resources) it is level 1. But how to change that?

## Replies

### Reply by Anonymous User

It is not possible to set a custom consistency level when using the CrudRepository Interface of spring-data-cassandra. There is an open issue :https://jira.spring.io/browse/DATACASS-14. \
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.


---

Original Source: https://www.mindstick.com/forum/33660/spring-data-cassandra-set-consistency-level

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
