Skip to main content

Parameter Configuration

ParameterAccepted values / typeDefaultDescription and constraints
serverhost[:port][;host[:port]...]From URLHost segment from the JDBC URL. Supports host:port or host1:port;host2:port.
databaseStringNoneDefault database when URL path is empty. The URL database path takes precedence and selects the default authentication database.
user / usernameStringNoneUsername for authentication. user takes precedence over username.
passwordStringEmptyPassword for authentication.
mechanismPLAIN / SCRAM-SHA-1 / SCRAM-SHA-256 / GSSAPI / X-509EmptyAuthentication mechanism: PLAIN, SCRAM-SHA-1, SCRAM-SHA-256, GSSAPI, X-509. Empty means createCredential.
clientNameStringMongo-JDBC-ClientMongoDB application name.
socketTimeoutInteger (milliseconds)Driver defaultSocket read timeout (ms).
socketSndBufferInteger (bytes)Driver defaultSocket send buffer size (bytes).
socketRcvBufferInteger (bytes)Driver defaultSocket receive buffer size (bytes).
retryWritestrue / falseDriver defaultEnable retry writes.
retryReadstrue / falseDriver defaultEnable retry reads.
timeZoneTime-zone ID or offset, e.g. UTC, +08:00UTCDriver time zone used for type conversion (for example +08:00).
customMongoFully qualified class nameNoneFully qualified class name implementing CustomMongo.
preReadtrue / falsetruePre-read and expand document fields; explicit projections expose only projected fields. Disabled mode returns raw-document columns only.
preReadThresholdSize with B / KB / MB / GB suffix5MBPre-read threshold size. Accepts B/KB/MB/GB. Defaults to MB when no unit is supplied.
preReadMaxFileSizeSize with B / KB / MB / GB suffix20MBMaximum pre-read file size. Accepts B/KB/MB/GB. Defaults to MB when no unit is supplied.
preReadCacheDirDirectory pathjava.io.tmpdirCache directory for pre-read mode.
adapterNamemongoFrom JDBC URLAdapter identifier supplied by the JDBC URL.