Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The ProducerStateManager is a logical component of Kafka which keeps a map from producer identifiers to the last offset written by that producer. There is a separate ProducerStateManager for each partition. Every time a segment is rolled this map is written to a producer snapshot file (since 2.8.snapshot0). The state is also written to a snapshot file on shutdown. These snapshot files are used to recover and bring the broker up to speed faster on startup. Much like the index and timeindex files the state stored in the producer snapshots can be recreated from the segment. Unlike the index and timeindex files, however, they require the whole log to be replayed rather than just the segment which lacks the snapshot.

...