1

In the below guide we can see its all annotation driven and entity , all the dao classes are generated during compile time.

https://quarkus.io/guides/cassandra#reactive

If you want to execute queries natively like u have a sql and prepare stmt and set values, execute it and then process the resultset , you can make use of QuarkusCqlSession class and add db properties in application.properties , this api gives output of Multi type.

cqlSession.prepare(sql).boundStatementBuilder().set(...).build(); cqlSession.executeReactive(boundstmt);

Q) Why the quarkus/cassandra-quarkus-client does not use the smallrye-mutiny-vertx-cassandra-client to interact with cassandra db ?

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23
Jaiprasad
  • 149
  • 11

1 Answers1

1

Because the Cassandra Quarkus extension is also for users that do not wish to use Mutiny and that want to inject a QuarkusCqlSession bean directly, anywhere in their application.

That said, it's probably possible for the Cassandra Quarkus extension to also expose an io.vertx.cassandra.CassandraClient bean, if Vert.x and Mutiny are in the classpath. That would be a nice addition to the extension.

adutra
  • 4,231
  • 1
  • 20
  • 18
  • io.vertx.cassandra.CassandraClient is not available with cassandra-quarkus-client , need to explicitly add smallrye-mutiny-vertx-cassandra-client dependency to get this class and we need to define this bean and configure db configuration as per CDI . Also if we use smallrye-mutiny-vertx-cassandra-client over the cassandra-quarkus-client then we need to define custom health check for the db , with cassandra-quarkus-client it does that for us . Also my concern is what are all the unknown benefits we will miss if we just use the smallrye-mutiny-vertx-cassandra-client and not the quarkus client. – Jaiprasad Jul 22 '22 at 13:55