1
votes

I have a Kafka Sink Task which is listening to a Kafka topic via put() method.
But I do not want to auto commit the offset as I have some processing logic once record is fetched from Kafka.
After fetching the records from Kafka, if the processing is successful then only I want to commit the offset else it should read from the same offset again.

I can see there is method commitSync() in Kafka consumer but cannot find an alternative in Sink Connector for the same.

1

1 Answers

0
votes

Add this property : ("enable.auto.commit", "false")

enable.auto.commit has a default value of true and a second property auto.commit.interval.ms has a default value of 5000