Last year I was on a team that pushed 40 million events per day through Kafka. We had consumer lag alerts, rebalancing incidents, and a whole runbook for when the broker got behind. I understood how to operate Kafka. But I did not understand how Kafka works.

So I built a tiny one. No dependencies. No Zookeeper. No JVM. Just Python and the core ideas.

Here is what I learned.

The Three Things Kafka Actually Does

People say "Kafka is a message queue." That is not quite right.