# Kafka Machine

Learn Kafka by playing

- **Place the pieces** Brokers, topics, consumers and Kafka Streams apps. Each one costs coins.

- **Wire them** Drag from a handle to connect a producer, a topic and the apps that read it.

- **Press Run** Messages flow by Kafka's own rules. The missions tell you whether your machine held.

## The 14 levels

### Basics

- **1. First pipeline.** Billing needs every order the shop sends. Build the whole pipeline. Lesson: [Kafka topics](https://www.conduktor.io/kafka/kafka-topics).
- **2. Rush hour.** The shop sends 10 orders a second. A consumer reads 4 a second. Lesson: [Consumer groups and offsets](https://www.conduktor.io/kafka/kafka-consumer-groups-and-consumer-offsets).
- **3. Two teams.** Analytics copied Billing’s config. Both teams need every order, without falling behind. Lesson: [Consumer groups and offsets](https://www.conduktor.io/kafka/kafka-consumer-groups-and-consumer-offsets).
- **4. In order.** Billing must see each customer’s events in the order they happened, and keep up. Lesson: [Kafka producers and message keys](https://www.conduktor.io/kafka/kafka-producers).

### Production

- **5. Big customer.** Customer A sends 70% of the orders. Each order’s events must stay in order. Lesson: [Kafka producers and message keys](https://www.conduktor.io/kafka/kafka-producers).
- **6. Disk failure.** At 8 s, the disk of the busiest broker dies. Billing can’t lose an order. Lesson: [Topic replication](https://www.conduktor.io/kafka/kafka-topic-replication).
- **7. Late joiner.** Analytics deploys at 10 s and needs every order since the start. Billing must keep up. Lesson: [Consumer auto offset reset](https://www.conduktor.io/kafka/consumer-auto-offsets-reset-behavior).

### Streams

- **8. Paid orders.** Shipping and Email only want paid orders. Filter in each app, or once with Kafka Streams? Lesson: [Kafka Streams stateless operations](https://www.conduktor.io/kafka-streams/stateless-operations).
- **9. Shipping labels.** Every order needs its customer’s address. The orders topic belongs to another team. Lesson: [Kafka Streams joins](https://www.conduktor.io/kafka-streams/joins).
- **10. Black Friday, 3 a.m.** Peak traffic, a hot customer, a dying disk at 12 s, and Shipping wants paid orders only. Lesson: [The Kafkademy Master track](https://www.conduktor.io/kafka).

### Architecture

- **11. The replay.** At 2 s, the data team replays last week’s orders into the shared cluster. Fraud checks must not fall behind. Lesson: [Kafka monitoring and operations](https://www.conduktor.io/kafka/kafka-monitoring-and-operations).
- **12. A partner outside.** A partner reads your orders from their own network. Your three brokers only have private addresses. Lesson: [Kafka advertised listeners](https://www.conduktor.io/kafka/kafka-advertised-host-setting).
- **13. Region down.** Region east goes dark at 9 s. Billing must carry on from region west, without losing or repeating much. Lesson: [Kafka multi-cluster and MirrorMaker](https://www.conduktor.io/kafka/kafka-multi-cluster-and-mirrormaker).
- **14. Move without stopping.** The old cluster is switched off at 10 s. Move the shop and billing to the new one: nothing lost, no order more than 4 s late. Lesson: [Kafka multi-cluster and MirrorMaker](https://www.conduktor.io/kafka/kafka-multi-cluster-and-mirrormaker).

## Questions about Kafka Machine

**Is Kafka Machine free?**

Yes. It runs in your browser, with no account and nothing to install. Your progress and your machines stay in your browser.

**Do I need to know Kafka to play?**

No. The first levels start from an empty cluster and teach topics, partitions and consumer groups as you go. Each level links to the Kafkademy lesson behind it.

**How close is it to real Kafka?**

It follows Kafka's defaults: one consumer per partition in a group, ordering within a partition, `acks=all`, a new group starting from the latest offset, replication and leader election. A few things are simplified on purpose, like a fixed hash instead of murmur2 and a fixed one-second election.

**Can I share my result?**

Yes. When you solve a level, share a link: its preview shows the level, the coins your machine costs and, if you want, your first name. Solve all 14 levels to get the Kafka Machine Architect badge for your LinkedIn profile.

Apache Kafka, Kafka and the Kafka logo are trademarks of the Apache Software Foundation. Kafka Machine is made by Conduktor and isn't endorsed by the Apache Software Foundation.
