Does Kafka change offset to 0 after cleaning up partitions?

Viewed 161

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?

1 Answers

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.

Related