Zazaeil
Zazaeil

Reputation: 4119

Kafka: does retired records affect offsets?

At some point of time there was a number x representing offset of some record A in some Kafka partition. After A comes B with its offset equals x + 1. Some time later A is taken by a retention policy due to expiration; does it mean that B is no longer at the x + 1 position, but went one step back (to take A's place) and thus became x? If so, is there a valid and reliable way to track not-yet-retired records by their ids to be able to get them rapidly, bypassing other records in corresponding partition?

Simplier question: are offsets unique values that never change, even if some records moved away by some retention policy?

Upvotes: 0

Views: 62

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191725

Yes, offsets are unique per Topic-partition and never change due to retention or otherwise

Upvotes: 1

Related Questions