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 could you provide a way to refresh Mongodb credentials in runtime without restarting the application?
Description
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 could you provide a way to refresh Mongodb credentials in runtime without restarting the application?
Implementation ideas
No response