Book 2 · Lesson 2.2
Kafka topics, partitions, and offsets
- Define topic, partition, and offset
- Relate millipede topic names to services
- Simulate produce and offset rewind per partition
Prerequisites: 2.1
Kafka is the append-only log between services.
Core vocabulary
| Term | Meaning |
|---|---|
| Topic | Named stream (raw-dev-events) |
| Partition | Ordered sub-log — parallel consumers |
| Offset | Monotonic index within a partition |
KafkaTopicExplorer — switch topics, pick partition P0–P2, produce messages.
Millipede topics
Axum Ingestion
Python LLM Worker
Rust Analyzer
SolidJS Dashboard
| Topic | Producer | Consumer |
|---|---|---|
raw-dev-events | ingestion | llm-worker |
enriched-dev-events | llm-worker | analyzer |
Teach-back prompt
Why use a partition key like team_id?
Docker Compose Kafka
Lab complete — nice work.