Skip to content
Theory · Kafka transactions and share groups · lesson 1 of 7

Transactions: atomic writes across partitions

Two ledgers: in both, one pair of lines is closed by a commit stamp, and another, faint but not erased, by an abort stamp

A billing service reads a payment from the orders topic, writes a charge record to the invoices topic and commits the offset. These are separate steps, and the process can crash between any two of them. If it crashes after the write but before the commit, then after a restart it charges the same payment again.

In this lesson

  • What a transaction does
  • transactional.id and the coordinator
  • A transaction in franz-go
  • Zombies and the epoch
  • Read, process, write
  • What stays outside
  • Common mistake
  • Key points