-
Type: Task
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Cluster Management
-
None
Hi,
According to the public documentation regarding the "DNS Seedlist Connection Format" and its examples, the java driver is supposed to resolve both the hostname and port behind the SRV record.
However, in the implementation of DnsSrvResolver, it is only getting the host from the SRV record and it constructs the ServerAddress assuming the mongo instance is running on the default port: 27017.
Is this a bug in the code or is this by design? If it is by design, I suggest we update the documentation and clearly states that the java driver assumes the mongo is running on the default port.
Related source code:
Thanks a lot,
Atwood