Docs Menu

Docs HomeDevelop ApplicationsMongoDB Kafka Connector

Topic Override Properties

On this page

  • Overview
  • Settings
  • Example

Use the following MongoDB Kafka sink connector configuration settings to override global or default property settings for specific topics.

For a list of sink connector configuration settings organized by category, see the guide on Sink Connector Configuration Properties.

Type: string

Specify a topic and property name to override the corresponding global or default property setting.


The setting instructs the sink connector to store data from the foo topic in the bar collection.


You can specify any valid configuration setting in the <propertyName> segment on a per-topic basis except connection.uri and topics.

Default: ""
Accepted Values: Accepted values specific to the overridden property

You can override the sink connector to sink data from specific topics. The following example configuration shows how you can define configuration settings for a topic named topicA:


After applying these configuration settings, the sink connector performs the following for data consumed from topicA:

  • Write documents to the MongoDB collection collectionA in batches of up to 100.

  • Generate a UUID value for each new document and write it to the _id field.

  • Omit fields k2 and k4 from the value projection using the BlockList projection type.

For an example of how to configure the Block List Projector, see the Post Processors guide.

← Sink Connector Write Model Strategies