-
Type: Question
-
Resolution: Done
-
Priority: Unknown
-
None
-
Affects Version/s: 4.5.0
-
Component/s: Configuration
Summary
I could not find, in any of the provided Settings builders, __ how to modify the "reconnect" options. I would really like to reduce the total timeout to less than 5 seconds. I've tried using "connectTimeout", "maxWaitTime", "readTimeout", "maxConnectionIdleTime".
Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).
Local mongodb instance with java driver (sync) 4.5.0.
How to Reproduce
MongoClient client = MongoClients.create(MongoClientSettings.builder().<what_here?>.build(); MongoDatabase database = client.getDatabase("test"); database.listCollectionNames().first(); // takes 30s before timeout...
Additional Background
Please provide any additional background information that may be helpful in diagnosing the bug.