Skip to main content

MongoDB Sink Connector

Target connector

MongoDB Sink Connector

MongoDB Sink writes Kafka records into MongoDB collections. It is used when the target system is document-oriented rather than relational.

Parameters​

CategoryParameterRequiredDescription
BasicnameYesUnique target connector name.
Basicconnector.classYesMongoDB sink connector class available in Kafka Connect.
Topicstopics / topics.regexYesKafka topics consumed by the connector.
Connectionmongodb.connection.stringYesMongoDB target connection string.
MappingdatabaseConditionalTarget database name if not derived from topics.
MappingcollectionConditionalTarget collection name if not derived from topics.
Write modedelete.handling.modeNoControls how delete events are applied to MongoDB.
Runtimemax.batch.sizeNoBatch size for writes.

Reference​

Debezium MongoDB sink connector