Configuring your application to use the PostgreSQL reactive client

In order to delve into the reactive Client API, please refer to the example contained in the Chapter09/pgpool folder in this book's GitHub repository. Since this example won't use the PostgreSQL JDBC driver, the following dependency has been added as a replacement:

<dependency>  <groupId>io.quarkus</groupId>  <artifactId>quarkus-reactive-pg-client</artifactId></dependency>

The other configuration we added was the JDBC URL, which needs to be in the following format:

vertx-reactive:postgresql://<Host>:<Port>/<DBName>

Therefore, in our example, we will add this setting in application.properties:

quarkus.datasource.url=vertx-reactive:postgresql://localhost:5432/quarkusdbquarkus.datasource.username=quarkus ...

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.