Manish
Manish

Reputation: 1

Polling with auto commit enabled in Kafka

When auto commit is enabled in Kafka and polling is triggered, is the (maximum present) offset committed before or after reading the new records?

Here we can assume that auto commit interval necessitate auto commit with this poll event.

Let me know, if question is not very clear.

Thanks.

Upvotes: 0

Views: 755

Answers (1)

Michal Borowiecki
Michal Borowiecki

Reputation: 4334

On poll, if the auto-commit interval elapsed, the offset of the last message returned from the previous poll will be committed before getting new records. However, if that commit fails, the processing keeps going and the commit will be re-attempted later.

See previous question: Kafka offset management

Upvotes: 1

Related Questions