JDBC Driver for MongoDB

Build 24.0.9060

ReplicaSet

This property allows you to specify multiple servers in addition to the one configured in Server and Port . Specify both a server name and port; separate servers with a comma.

Data Type

string

Default Value

""

Remarks

This property allows you to specify the other servers in the replica set in addition to the one configured in Server and Port. You must specify all servers in the replica set using ReplicaSet, Server, and Port.

Specify both a server name and port in ReplicaSet; separate servers with a comma. For example:

Server=localhost;Port=27017;ReplicaSet=localhost:27018,localhost:27019;

To find the primary server, the driver queries the servers in ReplicaSet and the server specified by Server and Port.

Note that only the primary server in a replica set is writable. Secondaries can be readable if the SlaveOK setting allows it. To configure a strategy executing SELECT queries to secondaries, see ReadPreference.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060