Poco::MongoDB::ReplicaSet

struct Config

Library: MongoDB
Package: MongoDB
Header: Poco/MongoDB/ReplicaSet.h

Description

Replica set configuration

Variables

1 }

unsigned int serverReconnectDelaySeconds { 1 };

Topology monitoring interval in seconds (default: 10) Number of connection retries to a server/replica set if no server is available temporarily Delay in seconds between re-connects to a server/replica set if no server is available temporarily

10 }

unsigned int connectTimeoutSeconds { 10 };

Default read preference for this replica set. Connection timeout in seconds (default: 10)

NOTE: This value is currently unused by ReplicaSet itself. It is intended for use by custom SocketFactory implementations. Custom factories can access this value via ReplicaSet::configuration() and use it when creating sockets. Use ReplicaSet::setSocketFactory() to set a custom factory that utilizes this timeout value.

30 }

unsigned int socketTimeoutSeconds { 30 };

Socket send/receive timeout in seconds (default: 30)

NOTE: This value is currently unused by ReplicaSet itself. It is intended for use by custom SocketFactory implementations. Custom factories can access this value via ReplicaSet::configuration() and use it when creating sockets. Use ReplicaSet::setSocketFactory() to set a custom factory that utilizes this timeout value.

nullptr }

Connection::SocketFactory * socketFactory { nullptr };

Optional socket factory for SSL/TLS connections. Can be set via config or later using setSocketFactory(). Custom factories can access timeout config via ReplicaSet::configuration().

seeds

std::vector < Net::SocketAddress > seeds;

Seed servers for initial topology discovery. At least one seed must be reachable.

setName

std::string setName;

Expected replica set name. If empty, will be discovered from servers.

true }

bool enableMonitoring { true };

Enable background topology monitoring (default: true)