MongoDB sink connector

Features

Connector name

mongodb

Delivery guarantee

At least once

Supported task sizes

M, L

Multiplex capability

A single instance of this connector can write to a single MongoDB collection

Supported stream types

Configuration properties

Property Description Required Default

connection-string

The connection string for your MongoDB cluster without your username and password.

Decodable supports both the Standard Connection String and DNS Seed List Connection String formats.

For example: mongodb(+srv)://my-cluster.mongodb.net/?retryWrites=true&w=majority

Yes

database

The name of the database containing the collection to which you want to send data.

Yes

collection

The name of the collection to send data to.

Yes

username

Your MongoDB username.

Yes

password

The secret containing your MongoDB password. This must be provided as a secret resource.

Yes

Connector starting state and offsets

A new sink connection will start reading from the Latest point in the source Decodable stream. This means that only data that’s written to the stream when the connection has started will be sent to the external system. You can override this when you start the connection to Earliest if you want to send all the existing data on the source stream to the target system, along with all new data that arrives on the stream.

When you restart a sink connection it will continue to read data from the point it most recently stored in the checkpoint before the connection stopped. You can also opt to discard the connection’s state and restart it afresh from Earliest or Latest as described above.

Learn more about starting state here.