Skip to content

Commit df312f6

Browse files
gasabrGleb Abroskin
and
Gleb Abroskin
authored
fixed source setup in docker example (#99)
Added json key and value converter to the MongoDB Kafka Source Connector, the default Avro converter does not handle mongo jsons properly adding binary values in front of each key and value. The behaviour could be verified by running ./run.sh from the docker folder KAFKA-285 Co-authored-by: Gleb Abroskin <[email protected]>
1 parent 54d12b7 commit df312f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docker/run.sh

+2
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ curl -X POST -H "Content-Type: application/json" --data '
125125
"tasks.max":"1",
126126
"connector.class":"com.mongodb.kafka.connect.MongoSourceConnector",
127127
"connection.uri":"mongodb://mongo1:27017,mongo2:27017,mongo3:27017",
128+
"key.converter": "org.apache.kafka.connect.json.JsonConverter",
129+
"value.converter": "org.apache.kafka.connect.json.JsonConverter",
128130
"topic.prefix":"mongo",
129131
"database":"test",
130132
"collection":"pageviews"

0 commit comments

Comments
 (0)