Unable to specify the "reconnectTries" and "reconnectInterval" settings

XMLWordPrintableJSON

    • Type: Question
    • Resolution: Done
    • Priority: Unknown
    • None
    • Affects Version/s: 4.5.0
    • Component/s: Configuration
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Jeffrey Yemin
            Reporter:
            Gab St-Pierre
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: