For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Make the MongoDB docs better! We value your opinion. Share your feedback for a chance to win $100.
MongoDB Branding Shape
Click here >
Docs Menu

Sink Connector Post-processor Properties

Use the following configuration settings to specify how the MongoDB Kafka sink connector should transform Kafka data before inserting it into MongoDB.

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

Name
Description

post.processor.chain

Type: list

Description:
A list of post-processor classes the connector should apply to process the data before saving it to MongoDB.

To learn more about post-processors and see examples of
their usage, see
Sink Connector Post Processors.

Default:

com.mongodb.kafka.connect.sink.processor.DocumentIdAdder

Accepted Values: A comma-separated list of fully qualified Java class names

field.renamer.mapping

Type: string

Description:
A list of field name mappings for key and value fields. Define the mappings in an inline JSON array in the following format:

[ { "oldName":"key.fieldA", "newName":"field1" }, { "oldName":"value.xyz", "newName":"abc" } ]

Default: []
Accepted Values: A valid JSON array

field.renamer.regexp

Type: string

Description:
A list of field name mappings for key and value fields using regular expressions. Define the mappings in an inline JSON array in the following format:

[ {"regexp":"^key\\\\..*my.*$", "pattern":"my", "replace":""}, {"regexp":"^value\\\\..*$", "pattern":"\\\\.", "replace":"_"} ]

Default: []
Accepted Values: A valid JSON array

field.value.transformer

Type: string

Description:
Fully qualified class name of a FieldValueTransformer implementation. When configured, the connector applies the specified transformer to the fields listed in field.value.transformer.fields before writing to MongoDB. The class must implement com.mongodb.kafka.connect.sink.processor.field.transform.FieldValueTransformer and have a public no-arg constructor.

Default: ""
Accepted Values: A fully qualified Java class name

field.value.transformer.fields

Type: string

Description:
Comma-separated list of field names to which the connector applies the configured FieldValueTransformer. The connector also transforms nested fields in sub-documents with matching names.

Default: ""
Accepted Values: A comma-separated list of field names

key.projection.list

Type: string

Description:
A list of field names the connector should include in the key projection.

Default: ""
Accepted Values: A comma-separated list of field names

key.projection.type

Type: string

Description:
The key projection type the connector should use.

Default: none
Accepted Values: none, BlockList, or AllowList (Deprecated: blacklist, whitelist)

value.projection.list

Type: string

Description:
A list of field names the connector should include in the value projection.

Default: ""
Accepted Values: A comma-separated list of field names

value.projection.type

Type: string

Description:
The type of value projection the connector should use.

Default: none
Accepted Values: none, BlockList, or AllowList (Deprecated: blacklist, whitelist)

writemodel.strategy

Type: string

Description:
The class that specifies the WriteModelStrategy the connector should use for Bulk Writes.

To learn more about how to create your own strategy, see
Custom Write Model Strategies.

Default:

com.mongodb.kafka.connect.sink.writemodel.strategy.DefaultWriteModelStrategy

Accepted Values: A fully qualified Java class name

On this page