uneq95
uneq95

Reputation: 2228

How to make multiple save calls atomic in reactive spring data cassandra?

The scenario is that, I have a cassandra API which needs to save data in 3 tables/repositories. So, once the API is hit, either data should be persisted in all the tables or in none of them. How do I acheive this?

The microservice is based on spring boot and web flux and ofcourse reactive spring data cassandra.

I know that batching is still not available for reactive cassandra.

Can the zip operator be of any help here if I zip the 3 save calls using the operator? (I suspect, it won't be helpful)

Insights on this will be very helpful. Thanks.

Upvotes: 1

Views: 599

Answers (1)

Laxmikant
Laxmikant

Reputation: 1621

You are right ..there was no support for BatchOperations in reactive cassandra but they have introduced it in version 2.1 RC2 check this

As an alternative you can club you individual statements in Batch and use.

Upvotes: 2

Related Questions