
- API to expose topics
- print list of all topics
- API for publisher to push message against a topic
- API to subscribe and unsubscribe from a topic
- API for subscriber to consume from a topic
- Maintain the state of consumption of each message in each topic for each consumer
- Maintain order of message consumption for each consumer
- String data
- String publisherId
- Reads from a Topic
- Can subscribe to single topic
- name
- topic -> Topic or null
- consume()
- publishes to a Topic
- can publish to multiple topics
- name
- publish(Message, Topic)
- name
- List of Messages
- Map of Subscribers vs offset
- createTopic(name)
- getTopics()
- deleteTopic()
- Fail if messages are pending to be consumed
- isPresent() -> checks if topic is present or not
- getTopicByName()
- addSubscriber(Subscriber, Topic)
- removeSubscriber(Subscriber)
- publishMessage(Message, Publisher, Topic)
- consumeMessage(Subscriber)
- Create separate Services for Publisher and Subscriber
- This implementation is Push and Pull, think of Publish and Subscribe