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?