Hello Kafka — topic, brokers, records

A topic is a named partitioned log spread across brokers in a cluster; producers send records (key, value, timestamp, headers) to a topic and consumers poll records back — every later scene zooms into one slice of this picture.

Previously

You've named the parts. Now meet a real topic — partitioned across brokers — and watch a record's journey from producer call to consumer poll, end to end.

Scene 01a

Hello Kafka — topic, brokers, records

  1. Watch
  2. Try it
  3. Predict
  4. Capture
Producersend(record)key, value, timestampPARTITION 0events3 partitions1 partition shownBroker 2holds P0, P3, P7PRODUCER / CONSUMER PSEUDOCODEproducer = new Producer({ broker: "..." })producer.send({ topic: "events", key: "user-42", value: click })// routed by keyconsumer = new Consumer({ groupId: "dashboard" })consumer.subscribe("events")for (record of consumer.poll()) { ... }Consumeroffset = 0
What to watch for

A topic called "events" lives on a broker as a partitioned log. The producer sends records into Partition 0; the consumer polls them back. Watch the code panel — the line that's running glows.

Continue unlocks when the animation finishes.

Where this sits in Build Kafka

Scene 01a of 13, in the Why a log? act — Orientation — the log is the database, not a queue.. Foundations: what's a topic vs a partition, what's a broker, what does the producer/consumer code actually look like.

Up next. The log is the database — why a Kafka log isn't a queue, and why that one fact unlocks every later scene in the curriculum.

All 13 scenes in Build Kafka · Every curriculum

Built with Arqly
Every scene in Build Kafka builds on the one before it.All 13 Build Kafka scenes