#exactly-once
Posts
-
Digging into Kafka's Source 12: Idempotence and Transactions — How Exactly-Once Is Built, and Wrapping Up the Series
We follow in the source what happens behind enable.idempotence=true and a transactional.id. Where the broker uses the producer id, epoch and sequence to spot duplicates from retries; how the transaction coordinator records state in __transaction_state and has commit/abort markers (control records) written to every partition; how a read_committed consumer filters with the last stable offset (LSO) and a list of aborted transactions; and how an old producer with the same transactional.id is fenced off by its epoch — checked with raw-socket, kafka-dump-log and kafka-transactions examples. As the last post, it also looks back over parts 1–12 to close the series.