Using RxJava with Quarkus

In order to learn about RxJava, we will go through the example contained in the Chapter09/rx2java/customer-service folder in this book's GitHub repository.

The first thing you should be aware of is that, in order to use RxJava with Quarkus, you have to add an instance of Vertx, which can be found under the io.vertx.reativex.core namespace:

@Inject io.vertx.reactivex.core.Vertx vertx;

That being said, one of the main advantages of including ReactiveX in our project is that it will greatly enhance the capability of transforming data that flows between the observable and the subscriber.

For example, let's take a look at the following use case:

  • We want to produce a file with a list of customers to be imported in a ...

Get Hands-On Cloud-Native Applications with Java and Quarkus now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.