简体   繁体   中英

Spring data cassandra CrudRepository save issue : some messages are not getting inserted

To insert a message in Cassandra Column Family with primary key messageId (type: UUID ) I am using Spring data Cassandra CrudRepository save method. When we run the load with thousands of requests coming per second (2k-3k) with message body size of 40 kb, the save method does not throw any exception. But while fetching them I observe that some messages are missing in database!

Note: When we use small message body (100 bytes) then we don't observe such problem.

Please suggest how can i resolve this ? Should not i use CrudRepository save method?

OR I just want to know how to know that the save is successful or not ?

The issue was related to consistency level. We were using default consistency level before but later on after setting read and write consistency level to QUORUM the problem got resolved.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM