Apache Kafka Cheat Sheet
Topics, clients, delivery, schemas, Connect, and Streams — the Kafka patterns from the track on one page. Bookmark it.
Projects to build
The fastest way to make this stick. Build one, then put it in your portfolio.
Local orders topic
Run one local broker, create an orders topic, produce a few text records, and read them back with --from-beginning. Describe the topic and name the partition and offset of one record.
Keyed customer events
Produce order events keyed by customer_id and confirm the same key stays on one partition. Then key by country and see why that partition gets hot.
Billing consumer group
Two consumers in group billing share the orders partitions, commit only after an idempotent write, and send bad records to orders.dlq. Watch lag while a second group reads the same topic on its own.
Orders file sink
Run Connect in distributed mode and sink orders to a file with the built-in file connector. Check task status, then register an order schema and add one optional field without breaking old consumers.
Windowed order counts
A Kafka Streams app filters test orders, counts orders by store in five-minute windows, and writes the counts to a topic. Give the app its own principal with Read on the input, Write on the output, and no wildcard ACLs.
