How to avoid full load of documents when we delete and re run the connector

Hi there,

i am running a mongo source connector, pushing data onto kafka. I am in a situation where the container exits or some configuration changes i may have to delete and re run the connector or just simply re run it. However, when i re run the connector the complete set of documents are loading again and again as long as i re run it.

Here are the configs i use, any help would be appreciated. thanks in advance.

  "connector.class": "com.mongodb.kafka.connect.MongoSourceConnector",
  "connection.uri": "localhost:27017",
  "key.converter": "org.apache.kafka.connect.json.JsonConverter",
  "value.converter": "org.apache.kafka.connect.json.JsonConverter",
  "key.converter.schemas.enable": "false",
  "value.converter.schemas.enable": "true",
  "value.converter.schema.registry.url": "http://localhost:8081",
  "tasks.max": "1",
  "output.format.value": "schema",
  "output.schema.infer.value": "true",
  "output.json.formatter": "com.mongodb.kafka.connect.source.json.formatter.DefaultJson",
  "": "updateLookup",
  "publish.full.document.only": "true",
  "copy.existing": "true",
  "topic.prefix": "test",
  "database": "test-db",
  "collection": "test-coll"