GeezerVison is showing github.com — GitHub - alpha74/Pub-Sub-Queue_JavaSpringBoot: Code for Pub-Sub queue implementation using Java Spring Boot.
Folders and files
| Name | Name | Last commit message | Last commit date |
|---|
| | | |
| | | |
| | | |
| | | |
|
Repository files navigation
- API to expose 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)
Improvements which were suggested:
- Create separate Services for Publisher and Subscriber
- This implementation is Push and Pull, think of Publish and Subscribe
About
Code for Pub-Sub queue implementation using Java Spring Boot.
Resources
Stars
0 stars
Watchers
1 watching
Forks