

Design a Message Queue
Build the queue behind a shop's order emails, from a list in memory on one machine to a replicated broker like SQS.
Watch lesson 01
Free preview01 What a queue promises
- Lessons
- 9
- Modules
- 3
- Running time
- ~3.3 hours
- Before you start
- Comfortable reading code
- Free to watch
- 3 lessons
- Last updated
- Oct 15, 2026
Part of
- Backend engineer track/Step 8 of 12
- System design interview track/Step 6 of 9
[01] Access
[02] Who it's for
- Backend engineers who send work through SQS, RabbitMQ or Kafka and want to know what the broker does with it.
- Engineers who want to see how a durable queue is built, from a list in memory to a replicated broker.
- No prior knowledge of queue internals is needed.
[03] What you'll learn
- 01Store messages in an append-only log and choose how much you can lose on a crash
- 02Hand a message to a consumer without losing it, using visibility timeouts and receipt handles
- 03Delete, retain and dead-letter messages without rewriting files
- 04Spread queues across machines with partitions and keep them alive with replication
- 05Read the design choices behind SQS, RabbitMQ and Kafka
[04] Syllabus
Module 01
One machine
3 lessons/64 min- 0123m
- 02
The log on disk
Free21m - 0320m
Module quiz
5 questions, about 5 minutes
Module 02
Consumers
3 lessons/69 min- 04
Receiving without losing a message (locked)
23m - 05
Deletes, retention and dead letters (locked)
22m - 06
Delays, timers and FIFO (locked)
24m Module quiz
5 questions, about 5 minutes
Module 03
Many machines
3 lessons/64 min- 07
Many queues, many machines (locked)
21m - 08
Surviving a dead machine (locked)
23m - 09
Running it (locked)
20m Module quiz
5 questions, about 5 minutes
[05] How it's made
The curriculum is curated by karnstack and reviewed by senior engineers in the industry before it ships. Narration is an AI voice (ElevenLabs) reading human-written, human-reviewed scripts. Read how courses are made.