Krishna
Krishna

Reputation: 659

Which dependency to be used for Cassandra DB (Reactive)

My application is Spring Reactive based and I need to start using Cassandra DB (v 3.11.6).

Initially I have done my DB requirement by adding spring-data-cassandra and it was able to write DB routines using ReactiveCassandraTemplate as well.

But recently while searching in Net I just came to know that, there is one more dependency named spring-boot-starter-data-cassandra-reactive is there for Cassandra DB.

So now the confusion is that, which one I have to use in my case and what is the difference between these two dependencies

Please help

Upvotes: 2

Views: 384

Answers (1)

Toerktumlare
Toerktumlare

Reputation: 14783

If you look at mvnrepository.com at the spring-boot-starter-data-cassandra-reactive

You will notice that spring-data-cassandra is a compile dependency of spring-boot-starter-data-cassandra-reactive repository.

Also you will notice that spring-boot-starter-data-cassandra-reactive has a compile dependency on reactor-core.

So if you are using spring webflux it will automatically drag in reactor-core for you, that's why by just dragging in spring-data-cassandra it will work anyway.

So that's the difference.

Upvotes: 3

Related Questions