All problems
Foundational·💌 Messaging·Google · Amazon · Confluent

Design
Pub-Sub Messaging System

Design an in-memory publish-subscribe system where publishers send messages to topics and multiple subscribers receive them.

#OOP#Design Patterns#Messaging
Start Solving 6F + 3NF requirements inside

01 -  Why interviewers ask this

Publish-subscribe is the Observer pattern in disguise at a system level — this question checks whether you can decouple producers from consumers cleanly before you ever touch a real message broker.

02 -  Where this system exists in the real world

You interact with this design every day.

In-app event buses (UI state updates)

Microservice event notification systems

Chat/notification fan-out to multiple subscribers

03 -  What you'll master

Solve this once. Know it forever.

01

Apply the Observer pattern at a systems level

02

Decouple publishers from subscribers completely

03

Handle subscriber registration/removal safely

04 -  What you'll design

6 functional · 3 non-functional requirements.

Publishers send messages to named topics

5 more requirements inside

Sign in to unlock the full brief and start designing

Unlock Requirements

05 -  Companies that ask this

You may face this exact question in your next interview.

G
Google
A
Amazon
C
Confluent

Ready?

Open the canvas.
Design it yourself.

See all requirements, use staged hints, run your code, and compare with community discussions - all on the same canvas.

Start Solving