== RxJava 3 API

The Cassandra client provides an Rxified version of the original API.

=== Creating an Rxified client

To create an Rxified Cassandra client, make sure to import the `link:../../apidocs/io/vertx/rxjava3/cassandra/CassandraClient.html[CassandraClient]` class.
Then use one of the `create` methods to get an instance:

[source,java]
----
`link:../../apidocs/examples/RxCassandraClientExamples.html#createClient-io.vertx.rxjava3.core.Vertx-[createClient]`
----

=== Querying

In this section, we will reconsider some of the previous use cases with the Rxified API.

==== Streaming

A `link:../../apidocs/io/vertx/rxjava3/cassandra/CassandraRowStream.html[CassandraRowStream]` can be converted to a `link:../../apidocs/io/reactivex/rxjava3/core/Flowable.html[Flowable]`, which is handy when you have to deal with large data sets:

[source,java]
----
`link:../../apidocs/examples/RxCassandraClientExamples.html#simpleQueryStream-io.vertx.rxjava3.cassandra.CassandraClient-[simpleQueryStream]`
----

==== Bulk fetching

When your data set is small, it might be easier to get all results at once:

[source,java]
----
`link:../../apidocs/examples/RxCassandraClientExamples.html#simpleFullFetch-io.vertx.rxjava3.cassandra.CassandraClient-[simpleFullFetch]`
----