Autoreconnect on failed database connection

453 views Asked by At

Quarkus give possibility to configure reconnection on failed acquire for reactive connection through config properties

  • quarkus.datasource.reactive.reconnect-attempts
  • quarkus.datasource.reactive.reconnect-interval

And I am searching how to get same functionality for non-reactive connections.

My first idea was to make reconnections through playing with AgroalDataSourceListener, but developers rejected idea of injecting listeners. Inject of AgroalPoolInterceptors was chosen instead. But by looking at interface of interceptor, it looks like interceptor it is not something that help with my problem.

So do you have any idea how to force AgroalCP to reconnect to datasource infinetely?

0

There are 0 answers