Closed vsantwana closed 2 years ago
Looks like a duplicate of https://github.com/pgjdbc/r2dbc-postgresql/issues/529. The pool works on top of a ConnectionFactory
and a factory does not have public API to reconfigure it.
Thanks @mp911de for pointing it to me. Closing this issue.
Feature Request
Is your feature request related to a problem? Please describe
Currently I am working on migrating my Database from using static username and password to dynamic credentials, more specifically IAM DB authentication. The Auth Token that is used as a password expires every 15 minutes. We use R2DBC Connection Pool to get the connection pool and subsequently the connection. As I understand it so far, there is no way to update the password provided to the pool after the pool has been initialised. My current way of doing things is that I have a wrapper around my ConnectionPool object, which has a background thread that closes the current connection pool and initialises a new one every 13 minutes. There are two problems with the approach that I am doing:
Since the password would be needed again, when the connection pool has to scale up or has to restart for a reason, one solution could be to trust that the connection is correct and update the connection pool only when the new connections start failing, but it increases the number of errors in my application.
Describe the solution you'd like
ConnectionFactoryOptions
, with the name linkscheduledUpdate
which takes a callback to update other options taken by the factory.Describe alternatives you've considered
[See Description]
Teachability, Documentation, Adoption, Migration Strategy