Hi,
I am using mongo db sink connector.
The sink connector is working perfectly fine for all new documents to be inserted.
But for any existing document to be updated, its is my understanding that we have to provide _id in the payload of the topic message.
The DefaultWriteModelStrategy is ReplaceOneDefaultStrategy
When doing so, it works when the _id format is a int or string, but how to do so when the _id format is a BSON Object Id ?
I have been trying a lot of combinations, but nothing seems to work
Basic Sink Connector config
{
"name": "test-sink-connector1",
"config": {
"database": "destination_db",
"collection": "test_collection",
"connector.class": "com.mongodb.kafka.connect.MongoSinkConnector",
"tasks.max": "1",
"topics": "test_topic",
"key.converter": "org.apache.kafka.connect.json.JsonConverter",
"key.converter.schemas.enable": "false",
"value.converter": "org.apache.kafka.connect.json.JsonConverter",
"value.converter.schemas.enable": "true",
"connection.uri": "mongodb://mongo:27017",
"errors.tolerance": "all",
}
}