File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
driver-core/src/main/com/mongodb/connection Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -142,8 +142,17 @@ public Builder description(final String description) {
142
142
/**
143
143
* Sets the host name to use in order to look up an SRV DNS record to find the MongoDB hosts.
144
144
*
145
+ * <p>
146
+ * Note that when setting srvHost via {@code ClusterSettings.Builder}, the driver will NOT process any associated TXT records
147
+ * associated with the host. In order to enable the processing of TXT records while still using {@code MongoClientSettings},
148
+ * specify the SRV host via connection string and apply the connection string to the settings, e.g.
149
+ * {@code MongoClientSettings.builder().applyConnectionString(new ConnectionString("mongodb+srv://host1.acme.com")) }.
150
+ * </p>
151
+ *
145
152
* @param srvHost the SRV host name
146
153
* @return this
154
+ * @see com.mongodb.MongoClientSettings.Builder#applyConnectionString(ConnectionString)
155
+ * @see ClusterSettings.Builder#applyConnectionString(ConnectionString)
147
156
*/
148
157
public Builder srvHost (final String srvHost ) {
149
158
if (this .hosts != DEFAULT_HOSTS ) {
You can’t perform that action at this time.
0 commit comments