Refresh Mongo client without restarting application

We are using org.mongodb:mongodb-driver-sync:4.4.1 MongoClient.java and org.mongodb:mongodb-driver-core:4.4.1 MongoClientSettings.java for connecting to mongo db. We are also using org.springframework.data:spring-data-mongodb:3.4.18 AbstractMongoClientConfiguration framework to provide the mongo configuration to MongoClient.

Can you please help with any approach to refresh this MongoClient when the password gets rotated for existing user without restarting the application?

Hi @Ankit_Sheth and welcome to the community forum.

Apologies for being a little to respond as we were trying to help you with an exact update on the feature.

As discussed with the team, the feature request is in progress and is part of the DRIVER-2731: CSFLE/QE Support for more than 1 KMS provider per type and should be available in the future.

Please do not hesitate to reach out if you have any questions.

Best Regards
Aasawari