Refreshing mongo credentials in Quarkus

53 views Asked by At

I'm trying to use AWS Secrets Manager to store my Mongo DB credentials for the Quarkus application that uses Panache. In order to do this, I implemented a custom CredentialsProvider (https://quarkus.io/guides/credentials-provider#custom-credentials-provider). However, I found that CredentialsProvider is called only during the first access to db because MongoClient is instantiated as a bean and is cached in arc ApplicationContext. So my question: is there any way to refresh Mongodb credentials in runtime without restarting application?

0

There are 0 answers