This question evaluates a candidate's skills in distributed systems and streaming architectures, including pub-sub replay semantics, message ordering, storage and indexing strategies, scalability, and operational reliability.
Assume you have a distributed publish-subscribe messaging system with topics, publishers that write messages, and subscribers that consume them. Design a replay feature that lets a subscriber re-read historical messages after a failure, a deployment, or when a new subscriber joins.
Your design should cover:
Discuss the APIs, data model, storage architecture, indexing strategy, scaling approach, and how replay works end to end.