0

I need to connect to multiple postgres hosts with hibernate-reactive

As an example, with the classic jdbc driver, we can define this property to connect to our HA postgres instance:

quarkus.datasource.jdbc.url=jdbc:postgresql://my.host-1.com,my.host-2.com,my.host-3.com:5432/myDB?targetServerType=master&ssl=true&sslmode=verify-ca&sslcert=my-cert&sslkey=my-key&sslpassword=&sslrootcert=my-cert.crt

But here I saw that the vert.x PgClient does not support multi host connections directly in connection URI

I created an issue in vertx-sql-client here and a developer said me that it would be already possible by using the PgConnectOptions and a PgPool.

I did not see anything related in quarkus hibernate-reactive documentation.

Can anyone help me on this ? It seems we have to manage connections by URI.

godo57
  • 508
  • 2
  • 24
  • 1
    In vanilla Hibernate Reactive, you can pass a custom pool by using the service `ReactiveConnectionPool`. But Quarkus already implements a connection pool and I don't think it allows user to override it. You could ask in the Quarkus user chat on Zulip: https://quarkusio.zulipchat.com/#narrow/stream/187030-users – Davide D'Alto Nov 15 '22 at 10:34

0 Answers0