Mongo Source Connector able to copy existing data only first time that connector created or not?

Hi All,

I tried to capture change data from mongoDB with MongoDB Atlas source connector in Kafka.
But when I configure “copy.existing”:“true” and I recreated the connector with that same name that made duplicated data in Kafka topic.

How to configure connector let’s copy exiting data only first that created this connector after that if recreating the same name later then it didn’t read all existing again and resume capture changes after that only. Please help to guide me.

the issue I think in your scenario is that when you recreate the same connector, time has passed so during this time the underlying data could have changed dramatically from the first time. If you simply stop the connector and start it it will catch up (since it stores a resume token), thus there is no need to delete the connector and recreate it in your scenario.