Kafka, RabbitMQ & Queues
Transactions in Kafka
Kafka transactions make writes to several partitions visible together or not at all. Consumers see that outcome only when they read with read_committed, and the design covers writes inside Kafka only.
What you will be able to do
- Explain how transactional IDs, markers and read_committed work together.
- Decide which effects belong inside a Kafka transaction and which need a key or outbox.
What is in the lesson
- A real situation where this goes wrong
- How it works, step by step
- A walkthrough with commands you can run
- How it fails in production, and how to tell
- Three quiz questions with explanations
Read this lessonFree. No account needed.
More in Kafka, RabbitMQ & Queues
- Partition orderingIntermediate · 4 min
Kafka orders records only inside one partition, and never across partitions. Records that must stay in order need the same key, because the key decides which partition…
- Producer acksIntermediate · 4 min
Kafka producer acknowledgements and the in-sync replica threshold determine when writes can succeed.
- Consumer groupsIntermediate · 4 min
A consumer group shares a topic's partitions among its members, while each group keeps its own committed offsets. Groups do not affect each other, so one topic can feed…
- Consumer rebalanceIntermediate · 4 min
A rebalance reassigns a group's partitions when members join, leave or time out. The eager protocol stops every partition, while the cooperative protocol moves only the…
- Offset commitsIntermediate · 4 min
A committed offset marks the work a consumer group is done with. Auto-commit commits on a timer, so the timing of the commit decides whether a crash repeats or skips…
- Exactly once boundariesIntermediate · 4 min
Kafka exactly-once covers the records and offsets written inside Kafka. A database write or an external call sits outside that commit, so it needs its own key or outbox.