Education + Jobs Hiring Website - 2025
0 like 0 dislike
21 views
Razorpay Machine Coding Round C++ Question

Razorpay Machine Coding Round

 

Implement a persistent (in memory) pub-sub queue mechanism with guaranteed delivery of every published message for all the subscribed consumers in that subscribed topic in the same order.

 

Features:

Expose topics Publisher to push messages against a topic Subscribe and unsubscribe from topic Subscriber to consume from topic.

A topic can have multiple subscribers Maintain the state of consumption of each message in each topic for each consumer.

Maintain order of message consumption for each consumer.

Filtered message consumption in a topic by the consumer Handle cases of consumers not being available.

What to do with those messages?

 

Plus Points: Separate service or component that is responsible for topics, including creation and exposing topics Writing messages to disk and restoring them back when the queue is full, due to consumer unavailability. Maintaining copies of messages for serving data faster.

 

Code should be runnable.
ago in Online Assessments by Expert (137,360 points) | 21 views

Please log in or register to answer this question.