Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Practice build · Data stores and distributed systems

Build your own Message Broker

A Kafka-like log broker: producers append records to partitioned topics, and consumers read from offsets they commit.

  • Advanced
  • About 15–30 h
  • 5 checkpoints
  • 2 tutorials · C, Java

Pick a tutorial, then check yourself at each checkpoint. Work in any language you like.

Choose a tutorial

Why build it

Queues and event streams sit between most services. Building a log broker explains ordering, delivery guarantees, consumer offsets and retention better than any diagram.

You will be able to

  • Store records in a segmented, append-only log with an offset index.
  • Serve producers and consumers over a simple TCP protocol.
  • Track consumer offsets and explain at-least-once versus at-most-once delivery.
  • Reason about ordering within and across partitions.

Skills it exercises

Recommended on Data Engineer, Software Architect and System Design.

Checkpoints

How you know you are there

Work in any language. Each checkpoint ends with something you can run or observe, so you can check it yourself.

  1. Checkpoint 1Self-check

    Append-only log

    Done when: Records are appended to segment files with an offset index, and reading from any offset returns the right record after a restart.

  2. Checkpoint 2Self-check

    Protocol

    Done when: A producer CLI and a consumer CLI talk to the broker over TCP using a documented framing format.

  3. Checkpoint 3Self-check

    Partitions

    Done when: Records with the same key always land in the same partition and keep their order, checked with 10,000 records.

  4. Checkpoint 4Self-check

    Consumer offsets

    Done when: A consumer that crashes resumes from its last committed offset, and a test shows which records can be delivered twice and why.

  5. Checkpoint 5Self-check

    Retention

    Done when: Old segments are deleted by size or age without affecting consumers of newer offsets.

Stretch goals

  • Replicate partitions to a follower.
  • An MQTT broker with QoS levels, following the second tutorial.
Follow a tutorial

Step-by-step guides

Pick one in a language you know (tutorial languages: C, Java). They open on the author’s site.

Practice builds are self-paced: Tech Atlas does not track them or count them as evidence. To show a skill, take its knowledge check from the skill page.

Tutorials come from codecrafters-io/build-your-own-x (CC0, snapshot of 2026-07-14, commit aa17439; links checked on 2026-10-19). Each tutorial belongs to its author and keeps its own licence; Tech Atlas links to it and does not host it. Briefs, checkpoints and the mapping to skills are Tech Atlas editorial drafts.