Docs Home → MongoDB Kafka Connector
Converters
On this page
Overview
This guide describes how to use converters with the MongoDB Kafka Connector. Converters are programs that translate between bytes and Kafka Connect's runtime data format.
Converters pass data between Kafka Connect and Apache Kafka. The connector passes data between MongoDB and Kafka Connect. The following diagram shows these relationships:

To learn more about converters, see the following resources:
Available Converters
As the connector converts your MongoDB data into Kafka Connect's runtime data format, the connector works with all available converters.
Important
Use the Same Converter for your Source and Sink Connectors
You must use the same converter in your MongoDB Kafka source connector and MongoDB Kafka sink connector. For example, if your source connector writes to a topic using Protobuf, your sink connector must use Protobuf to read from the topic.
To learn what converter to use, see this page from Confluent.
Converters with Schemas
If you use a schema-based converter such as the Kafka Connect Avro Converter (Avro Converter), Kafka Connect Protobuf Converter, or Kafka Connect JSON Schema Converter, you should define a schema in your source connector.
To learn how to specify a schema, see the Apply Schemas guide.
Connector Configuration
This section provides templates for properties files to configure the following converters in a connector pipeline:
Avro Converter
Click the following tabs to view properties files that work with the Avro converter:
To use the preceding properties file, replace the placeholder text in angle brackets with your information.
Protobuf Converter
Click the following tabs to view properties files that work with the Protobuf converter:
To use the preceding properties file, replace the placeholder text in angle brackets with your information.
JSON Schema Converter
Click the following tabs to view properties files that work with the JSON Schema converter:
To use the preceding properties file, replace the placeholder text in angle brackets with your information.
JSON Converter
Click the following tabs to view properties files that work with the JSON converter:
To use the preceding properties file, replace the placeholder text in angle brackets with your information.
String Converter (Raw JSON)
Click the following tabs to view properties files that work with the String converter:
To use the preceding properties file, replace the placeholder text in angle brackets with your information.