Hi, check out the article https://www.mongodb.com/docs/kafka-connector/current/troubleshooting/recover-from-invalid-resume-token/#invalid-resume-token
To mitigate this configure a heartbeat interval as described later in that article https://www.mongodb.com/docs/kafka-connector/current/troubleshooting/recover-from-invalid-resume-token/#prevention.