I am doing sink from Postgres to MongoDB by MongoSinkConnector with Kafka. (Postgres → Kafka → MongoDB)
I can check there is u(= update) in op(= operationType) when I consume Kafka messages produced by Postgres from update operation.
However, all the operation types from updating Postgres’s records are not update but replace in op log of MongoDB.
Is replace default operation type when updating document by MongoSinkConnector?
If so, Is there any option to change it to update?
Replace is actually an upsert so it is intended to update the document if the _id matches else it create a new document if it does not. You can change the replace/upsert behavior using Write Strategies. You can chose the _id via DocumentIdAddr Configuration