System design interview question
Design Event Bus / Message Dispatcher
An in-process Event Bus that builds on the Observer pattern: type-safe event registration via generics, synchronous and asynchronous dispatch, priority-ordered handlers, a middleware/interceptor chain, error isolation between handlers, and a dead-letter queue for events whose handlers exhaust their retry budget. Implemented in TypeScript, Java, and C++.
Practice this question step by step with an AI interviewer that reviews your requirements, your architecture and your trade-offs, and scores the design.