Aiven-Open / gcs-connector-for-apache-kafka

Aiven's GCS Sink Connector for Apache Kafka®
Apache License 2.0
70 stars 38 forks source link

Clearing record grouper on exceptions to avoid duplicates #227

Closed AnatolyPopov closed 1 year ago

AnatolyPopov commented 1 year ago

When the exception is thrown during flush(e.g. network error), Kafka connects rewinds the offsets to last committed and tries to commit current offsets once again. This causes duplicates in the connector since the offsets are now cached in record grouper. Cleaning the record grouper on exception solves the issues.