[KAFKA-336] Not getting `operation type` column in the events of Mongo Kafka connector Created: 07/Nov/22  Updated: 27/Oct/23  Resolved: 07/Nov/22

Status: Closed
Project: Kafka Connector
Component/s: CDC, Configuration, Source
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Unknown
Reporter: Ross Carvalho Assignee: Ross Lawley
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

So I am using Mongo kafka connector as a source and here is my configĀ 

{
  "name": "MONGO_SO",
  "config": {
    "connector.class": "com.mongodb.kafka.connect.MongoSourceConnector",
    "errors.log.include.messages": "true",
    "publish.full.document.only": "true",
    "tasks.max": "1",
    "change.stream.full.document": "updateLookup",
    "collection": "coupon",
    "key.converter.schemas.enable": "false",
    "topic.prefix": "",
    "database": "",
    "poll.await.time.ms": "5000",
    "connection.uri": "",
    "name": "MONGO_SOU",
    "value.converter.schemas.enable": "false",
    "copy.existing": "true",
    "value.converter": "org.apache.kafka.connect.json.JsonConverter",
    "errors.log.enable": "true",
    "key.converter": "org.apache.kafka.connect.json.JsonConverter",
    "poll.max.batch.size": "1000"
  }
} 

But in the events that I receive in the kafka cluster doesn't contain any operation type column. Any thing to change in config to achieve thisĀ  ?



 Comments   
Comment by Ross Carvalho [ 07/Nov/22 ]

Thanks @Ross Lawley

Comment by Ross Lawley [ 07/Nov/22 ]

Hi Ross Carvalho,

You have set publish.full.document.only=true which will be the cause.

For future reference, I wanted to give you some resources to get questions answered quickly:

  • Our MongoDB support portal, located at support.mongodb.com
  • Our MongoDB community portal, located here
  • If you are an Atlas customer, there is free support offered 24/7 in the lower right hand corner of the UI

All the best,

Ross Lawley

Generated at Thu Feb 08 09:06:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.