[JAVA-4911] per-MongoClient DNS lookup configuration Created: 17/Mar/23  Updated: 28/Oct/23  Resolved: 18/Apr/23

Status: Closed
Project: Java Driver
Component/s: Configuration, Connection Management
Affects Version/s: None
Fix Version/s: 4.10.0

Type: New Feature Priority: Major - P3
Reporter: Ashni Mehta Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
Backwards Compatibility: Minor Change
Documentation Changes: Needed
Documentation Changes Summary:

It's debatable whether we should bother documenting this feature, as the use case is very niche. But marking as Needed so we can consider it.

At the least, we can mention something in release notes about it and link to API docs


 Description   

We removed support in JAVA-3044 for users to inject custom SocketFactory, but we're seeing a need for a user to be able to inject their own DNS resolver.

A draft PR for the API proposal can be found here https://github.com/mongodb/mongo-java-driver/pull/1098.



 Comments   
Comment by Githook User [ 21/Apr/23 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Fix test

JAVA-4911
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/12275e4f8bdf82d6a8c4adccb514716286e262ac

Comment by Githook User [ 21/Apr/23 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Fix test

JAVA-4911
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/e49226ddc1d6bdcb39cf8dc3f3e9c33e66767d89

Comment by Githook User [ 19/Apr/23 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Improve DNS configuration tests

JAVA-4911
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/16acf922865ec2052320203ceab04fff2b06422d

Comment by Githook User [ 19/Apr/23 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Fix UnixServerAddress interaction with InetAddressResolver

JAVA-4911
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/454ebd6938dc2b7f3e0c9b43f7bcac11fb28e009

Comment by Githook User [ 18/Apr/23 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Support per-MongoClient DNS lookup configuration (#1104)

  • Add InetAddressResolver interface
  • Add InetAddressResolverProvider interface
  • Add configuration of InetAddressResolver and DnsClient in MongoClientSettings and ConnectionString
  • Use configured InetAddressResolver and DnsClient to resolve all SRV, TXT, A, and AAAA records

JAVA-4911
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/a43c2cfacc3097413eef3189c76998c8aec2aa3a

Generated at Thu Feb 08 09:03:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.