Skip to main content


MongoDB is a NoSQL database that uses JSON-like documents with optional schemas. Meroxa will automatically discover the version, capabilities, and permission of the added MongoDB Resource and will create the appropriate connection.

The MongoDB Source Connector leverages the native oplog (as used internally within replica sets) to capture all changes from one or more collections and stream them on the Meroxa Platform.

Supported Environments#

The Meroxa Platform has been tested against the following MongoDB versions:

  • 3.4.x
  • 3.6.x
  • 4.0.x
  • 4.2.x

Adding Resource#

To add a MongoDB resource to your Meroxa Resource Catalog, you can run the following command:

meroxa resource add mongo --type mongodb -u "$MONGO_CONNECTION_STRING"

$MONGO_CONNECTION_STRING represents a valid Mongo Connection String.

Destination Configuration#

To configure MongoDB as a destination:

meroxa connector create to-mongo --to mongo --input $STREAM_NAME

The command above creates a new Connector called to-mongo, sets the destination to a resource named mongo and configures the Input Stream.

Configuration Options#

The following configuration is supported for this Connector:

collectionWhitelist filter for extracting a subset of fields from elastic-search JSON documents. The whitelist filter supports nested fields. To provide multiple fields use ; as separator (e.g. customer;order.qty;order.price).
index.prefixIndices prefix to include in copying.
incrementing.field.nameAn incremental/temporal field such as a timestamp or an incrementing id.