System Design · Building Blocks · Topic 4 of 5
Message Queues & Event Streaming
4 questions.
Your progress0%
- 1st Visit
- 0/4
- 2nd Visit
- 0/4
- Revise
- 0/4
Overview
Message queues and event streams let services communicate asynchronously: a producer publishes a message and moves on, while consumers process it later at their own pace. This decouples services, absorbs traffic spikes, and lets slow work such as sending emails, transcoding video or updating search indexes run in the background. This topic covers queues versus publish-subscribe, delivery guarantees, and how a log-based system such as Kafka scales. Signals include tasks that need not finish within the user's request, a single event that several services must react to, bursts of load that would overwhelm a downstream service, and requirements to replay past events. Always consider what happens when a consumer fails mid-message.
Questions
| # | Problem | Platform | Difficulty | Open | 1st1st Visit | 2nd2nd Visit | RevRevise |
|---|---|---|---|---|---|---|---|
| 1 | What is a message queue, and why would you use one? | Concept | Easy | Read the answer to What is a message queue, and why would you use one? | |||
| 2 | What is the difference between a message queue and a publish-subscribe system? | Concept | Medium | Read the answer to What is the difference between a message queue and a publish-subscribe system? | |||
| 3 | What do at-most-once, at-least-once and exactly-once delivery mean? | Concept | Medium | Read the answer to What do at-most-once, at-least-once and exactly-once delivery mean? | |||
| 4 | How does Kafka achieve high throughput, and how does it preserve message ordering? | Concept | Hard | Read the answer to How does Kafka achieve high throughput, and how does it preserve message ordering? |