Swiggy interview question

Design a pub-sub system with components.