Radosław Kopeć
Radosław Kopeć

Reputation: 31

Does Kafka change offset to 0 after cleaning up partitions?

Assume that Kafka cleans up our partitions after 1000 events. I want to set specific offset by using seek function in Consumer. Will I need to set the start offset at 1000 or 0 in seek method, if Kafka cleans up partition after 1000 messages?

Upvotes: 3

Views: 460

Answers (1)

aballaci
aballaci

Reputation: 1083

No, The offset for a message never changes. It is the permanent identifier for a position in the log. The new message after the cleanup will have offset 1000.

Upvotes: 3

Related Questions