vertx-sql-client
vertx-sql-client copied to clipboard
Preferred server type connection factory
This PR introduces a way to specify required/preferred server type among multiple servers when several hosts provided to pool factory. Example:
PgPool.pool(Vertx.vertx(), List.of(primaryHostOptions, replica1HostOptions, replica2HostOptions), poolOptions.setServerRequirement(PREFER_REPLICA))
Similar functionality provided by pgjdbc via targetServerType and libpq via target_session_attrs.
- [x] javadocs
Hey @vietj any chance you could have a look?
sure @Rattenkrieg
the new server type and requirements are specific to PG and the selection code should be in vertx-pg-client instead of vertx-sql-client
it seems that this specific mechanism should be used as a PgPool connection provider