Skill Zuno · skillzunos.com · System Design
Publish-Subscribe Pattern interview questions
Prepare for Publish-Subscribe Pattern interviews on Skill Zuno. This practice book covers Publish-Subscribe Pattern interview questions across New, Easy, Medium, Hard, and Diff levels so you can work through real interview-style problems on skillzunos.com.
Open Publish-Subscribe Pattern on Skill ZunoAlso see the Publish-Subscribe Pattern tutorial.
Publish-subscribe is a messaging pattern in which publishers send messages to a topic without knowing who will receive them, and every subscriber to that topic gets a copy. It decouples services and lets one event drive many independent reactions. Interviews cover topics versus queues, delivery guarantees, ordering, Kafka, Pub/Sub and SNS, and event-driven architecture.
Sample Publish-Subscribe Pattern interview questions
What is the difference between a message queue and pub/sub?
In a queue each message is processed by one consumer, which spreads work. In pub/sub every subscription receives each message, so many services can react to the same event.
Why is exactly-once delivery hard?
A consumer can process a message and crash before acknowledging it, so the broker redelivers. Systems deliver at least once and make consumers idempotent, which gives the effect of exactly once.
How does Kafka keep messages in order?
Order is guaranteed only within a partition. Messages with the same key go to the same partition, so all events for one order or user are processed in sequence.
What is a dead-letter queue?
A separate queue for messages that fail repeatedly. Moving them aside stops one bad message from blocking the rest, and lets engineers inspect and replay them later.
What are the downsides of event-driven systems?
Flows are harder to trace and debug, data is eventually consistent, and schema changes must stay compatible for every subscriber. Distributed tracing and a schema registry help.
What you can practice
- Publish-Subscribe Pattern interview questions for beginners and experienced developers
- Level-based practice: New, Easy, Medium, Hard, and Diff
- System Design topics alongside Publish-Subscribe Pattern on skillzunos.com