https://github.com/quarkiverse/quarkus-reactive-h2-client
Reactive H2 client for Quarkus
https://github.com/quarkiverse/quarkus-reactive-h2-client
h2 quarkus-extension reactive
Last synced: about 1 year ago
JSON representation
Reactive H2 client for Quarkus
- Host: GitHub
- URL: https://github.com/quarkiverse/quarkus-reactive-h2-client
- Owner: quarkiverse
- License: apache-2.0
- Created: 2023-02-01T13:52:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-13T03:50:02.000Z (about 1 year ago)
- Last Synced: 2025-04-13T04:24:54.708Z (about 1 year ago)
- Topics: h2, quarkus-extension, reactive
- Language: Java
- Homepage:
- Size: 163 KB
- Stars: 4
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Quarkus Reactive H2 Client
[](#contributors-)
[](https://search.maven.org/artifact/io.quarkiverse.quarkus-reactive-h2-client/quarkus-reactive-h2-client)
## Welcome to Quarkiverse!
This extension enable usage of reactive client on H2 database. Cause the Vert.x community does not develop a reactive driver for H2, Vert.x JDBC client is used for H2 database access.
The purpose of develop this extension is to speed up testing with in memory H2 database on developer's workstation or build server. Even though the code base is about 90% same with quarkus reactive mysql client, it's not suggested being used in product environments.
As [Clement Escoffier](https://github.com/cescoffier) had point out in [#20471](https://github.com/quarkusio/quarkus/issues/20471#issuecomment-1386577186): The problem with the reactive API using a JDBC driver is the heavy usage of worker threads. Everything goes to a worker thread making such kind of solution expensive and slow. It also limits the concurrency and may use the worker threads for a long time (which means that the rest of the system may have to wait to be executed). Once you accept these limitations, sure, you can use that approach. But don't expect any benefits.
Please pick corresponding version with Quarkus version:
| Quarkus | Reactive H2 Client |
|---------------|--------------------|
| 2.x | 0.1.x |
| 3.0.0 - 3.2.x | 0.2.x |
| 3.3.x - 3.8.x | 0.3.x |
| 3.15.x - | 0.4.x |
|3.19.x - 3.20.x |0.5.x |
|3.21.x - |0.6.x |
Notice: DevService not supported yet.
## Installation
If you want to use this extension, you need to add the `io.quarkiverse.quarkus-reactive-h2-client:quarkus-reactive-h2-client` extension first to your build file.
For instance, with Maven, add the following dependency to your POM file:
```
io.quarkiverse.quarkus-reactive-h2-client
quarkus-reactive-h2-client
{project-version}
```
## Usage
To test with this extension, you need specify h2 database instance for your application.
For instance with MariaDB, add the follow specification to your application.properties:
```
%test.quarkus.datasource.db-kind=h2
%test.quarkus.datasource.reactive.url=h2:mem:your_test_db;mode=mariadb;your_other_test_config
```
## Documentation
The documentation for this extension should be maintained as part of this repository and it is stored in the `docs/` directory.
The layout should follow the [Antora's Standard File and Directory Set](https://docs.antora.org/antora/2.3/standard-directories/).
Once the docs are ready to be published, please open a PR including this repository in the [Quarkiverse Docs Antora playbook](https://github.com/quarkiverse/quarkiverse-docs/blob/main/antora-playbook.yml#L7). See an example [here](https://github.com/quarkiverse/quarkiverse-docs/pull/1).
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!