How Kafka works · wrap-up
Cheat sheet & self-check
16 questions across 5 lessons. Each answer links back to the lesson it came from.
Pick an answer to see if you got it, and why.
Q1. With acks=1, when is a record at risk?
Show answer
B. acks=1 waits for the leader's disk only; a new leader may not have the record.
From lesson 06 · Producers in depthQ2. What does the idempotent producer prevent?
Show answer
B. The broker uses a producer ID and sequence numbers to drop retried duplicates. It does not cover the application sending the same thing twice.
From lesson 06 · Producers in depthQ3. Why does raising linger.ms often increase throughput?
Show answer
B. Batching amortises request overhead; the cost is a few milliseconds of latency.
From lesson 06 · Producers in depthQ4. A consumer commits offsets before processing the records, then crashes mid-batch. What happens?
Show answer
B. The committed position is already past them. Commit after processing for at-least-once.
From lesson 07 · Consumers and consumer groupsQ5. A brand-new consumer group starts on a topic with a week of data and auto.offset.reset=latest. What does it read?
Show answer
B. With no committed offset, latest means start at the end. Use earliest to read history.
From lesson 07 · Consumers and consumer groupsQ6. Processing each batch sometimes takes 10 minutes. The consumer keeps getting kicked out of the group. Why?
Show answer
B. Process fewer records per poll, speed up processing, or raise max.poll.interval.ms.
From lesson 07 · Consumers and consumer groupsQ7. RF=3, min.insync.replicas=2, acks=all. One broker fails. What happens to writes?
Show answer
B. The ISR shrinks to 2, still at least min.insync.replicas.
From lesson 08 · Replication and durabilityQ8. Same setup, two brokers fail. What does an acks=all producer see?
Show answer
B. Kafka chooses consistency: it refuses writes it cannot store safely.
From lesson 08 · Replication and durabilityQ9. Why is unclean leader election disabled by default?
Show answer
B. It trades data loss for availability; most systems should not make that trade.
From lesson 08 · Replication and durabilityQ10. Consumers can read a record only after it is…
Show answer
B. The high watermark prevents consumers from seeing records that could disappear in a leader change.
From lesson 08 · Replication and durabilityQ11. retention.ms is 1 hour, but 3-hour-old records are still there. Most likely reason?
Show answer
B. Only closed segments whose newest record is older than retention are deleted. Smaller segment.ms or segment.bytes makes retention more precise.
From lesson 09 · Storage, retention and compactionQ12. What does a compacted topic guarantee?
Show answer
B. Older values for a key are removed in the background; the newest stays.
From lesson 09 · Storage, retention and compactionQ13. How do you delete a key from a compacted topic?
Show answer
B. Compaction removes older values, then removes the tombstone itself after delete.retention.ms.
From lesson 09 · Storage, retention and compactionQ14. A service writes an order to its database and then sends an event to Kafka. It crashes between the two. What is the result?
Show answer
B. Two separate systems cannot be updated atomically without a pattern such as the outbox.
From lesson 10 · Delivery guarantees and exactly-onceQ15. What does isolation.level=read_committed do?
Show answer
B. It is required on the reading side for transactional exactly-once.
From lesson 10 · Delivery guarantees and exactly-onceQ16. One record always makes your consumer throw an exception. What should happen?
Show answer
B. A poison message must not block a partition forever; park it for later analysis.
From lesson 10 · Delivery guarantees and exactly-once