Skip to content

Commit 79722ed

Browse files
authored
DOCSP-47044: Polling DNS SRV records (#646)
* DOCSP-47044: Polling DNS SRV records * add ref * word * stage
1 parent d0e0c8b commit 79722ed

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

source/connection/connect.txt

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,8 @@ figure explains each part of a sample connection URI:
6666
:alt: An example of a connection string that demonstrates the protocol, credentials, hostname or IP, port, and connection options
6767

6868
In this example, you connect to an Atlas MongoDB deployment that has a
69-
DNS SRV record. For more details, see the :manual:`DNS Seed List
70-
Connection Format
71-
</reference/connection-string/#dns-seed-list-connection-format>`
72-
documentation. This format offers flexibility in deployment and the
73-
ability to change the servers in rotation without reconfiguring clients.
69+
DNS SRV record. For more information, see the :ref:`connection-uri-srv`
70+
section of this guide.
7471

7572
.. note::
7673

@@ -100,6 +97,19 @@ In the example, you set two connection options: ``maxPoolSize=20`` and
10097
``w=majority``. For more information about connection options, skip to the
10198
:ref:`connection-options` section of this guide.
10299

100+
.. _connection-uri-srv:
101+
102+
DNS Service Discovery
103+
~~~~~~~~~~~~~~~~~~~~~
104+
105+
.. sharedinclude:: dbx/srv-polling.rst
106+
107+
.. replacement:: srv-uri
108+
109+
.. code-block:: java
110+
111+
String uri = "mongodb+srv://<hostname>/";
112+
103113
.. _connect-atlas-java-driver:
104114

105115
Atlas Connection Example

0 commit comments

Comments
 (0)