이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 3. Configuring reactive data sources with Quarkus


You can use a reactive data source driver to connect your application to a relational database.

3.1. Setting the reactive data source connection URL

You must configure the connection URL for the reactive data source to complete configuration of your data source.

Prerequisites

  • You have a Quarkus Maven project.
  • You have added a reactive data source driver to your application.

Procedure

  1. Navigate to your Quarkus project directory.
  2. In the src/main/resources/application.properties file, set the value of the quarkus.datasource.reactive.url property to match the connection URL of your reactive data source:

    quarkus.datasource.reactive.url=<datasource_URL>

    For example, to set the reactive data source connection URL for the PostgreSQL data source:

    quarkus.datasource.reactive.url=postgresql:///your_database
  3. Optionally, you can set the maximum number of connections in the connection pool of your data source to improve the performance of your application:

    quarkus.datasource.reactive.max-size=20

    For example, to add a postgresql data source with a reactive data source driver:

    quarkus.datasource.db-kind=postgresql
    quarkus.datasource.username=<your_username>
    quarkus.datasource.password=<your_password>
    
    quarkus.datasource.reactive.url=postgresql://localhost:5432/quarkus_test_database
    quarkus.datasource.reactive.max-size=20

3.2. Disabling a reactive data source in a simultaneous configuration

You can simultaneously configure a reactive driver extension and a JDBC driver extension for the same data source in your application. You can disable the reactive data source driver in a simultaneous configuration, thus forcing your application to use the JDBC data source driver.

Prerequisites

  • You have a Quarkus Maven project.
  • You have a JDBC data source driver and a reactive data source driver configured simultaneously in your application.

Procedure

  1. Navigate to your Quarkus project directory.
  2. Open the src/main/resources/application.properties file.
  3. Set the quarkus.datasource.reactive property to false to disable the reactive data source:

    quarkus.datasource.reactive=false
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동