hpgrahsl / kafka-connect-mongodb

**Unofficial / Community** Kafka Connect MongoDB Sink Connector -> integrated 2019 into the official MongoDB Kafka Connector here: https://www.mongodb.com/kafka-connector
Apache License 2.0
153 stars 60 forks source link

Are there any configuration setting to get fullDocument Json only? #117

Closed San13 closed 4 years ago

San13 commented 4 years ago

I use mongo-kafka source connector to produce Mongo Collection to Kafka topic. The following is the data I received in my consumer.

{"schema":{"type":"string","optional":false},"payload":"{\"_id\": {\"_id\": {\"$oid\": \"5e4263864fff6b0e591f093b\"}, \"copyingData\": true}, \"operationType\": \"insert\", \"ns\": {\"db\": \"test\", \"coll\": \"Device\"}, \"documentKey\": {\"_id\": {\"$oid\": \"5e4263864fff6b0e591f093b\"}}, \"fullDocument\": {\"_id\": {\"$oid\": \"5e4263864fff6b0e591f093b\"}, \"companyID\": \"0\", \"companyName\": \"\", \"blePreSharedKey\": \"0\", \"isDecommission\": false, \"deployDT\": {\"$date\": 1581409158080}, \"deployBy\": \"\", \"status\": \"\", \"latitude\": 0.0, \"longitude\": 0.0, \"locationDescription\": \"\", \"productID\": \"0\", \"productName\": \"\", \"offlineInterval\": 0, \"createDT\": {\"$date\": 1581409158078}, \"deviceUser\": \"\", \"deviceAssigned\": false, \"endPoint\": \"test9\", \"nodeMacAddr\": \"\", \"_class\": \"test\"}}"}

Is the source connector possible to produce "fullDocument" data only to kafka topic? Thanks

San13 commented 4 years ago

I changed in connector configuration.

key.converter.schemas.enable=false value.converter.schemas.enable=false