{"id":20485685,"url":"https://github.com/alpha74/pub-sub-queue_javaspringboot","last_synced_at":"2026-04-20T06:34:02.059Z","repository":{"id":255689988,"uuid":"853407959","full_name":"alpha74/Pub-Sub-Queue_JavaSpringBoot","owner":"alpha74","description":"Code for Pub-Sub queue implementation using Java Spring Boot.","archived":false,"fork":false,"pushed_at":"2024-09-06T15:48:44.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T16:37:16.798Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alpha74.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-06T15:41:43.000Z","updated_at":"2024-09-06T15:48:47.000Z","dependencies_parsed_at":"2024-09-06T19:00:12.710Z","dependency_job_id":null,"html_url":"https://github.com/alpha74/Pub-Sub-Queue_JavaSpringBoot","commit_stats":null,"previous_names":["alpha74/pub-sub-queue_javaspringboot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alpha74/Pub-Sub-Queue_JavaSpringBoot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha74%2FPub-Sub-Queue_JavaSpringBoot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha74%2FPub-Sub-Queue_JavaSpringBoot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha74%2FPub-Sub-Queue_JavaSpringBoot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha74%2FPub-Sub-Queue_JavaSpringBoot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alpha74","download_url":"https://codeload.github.com/alpha74/Pub-Sub-Queue_JavaSpringBoot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha74%2FPub-Sub-Queue_JavaSpringBoot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32036501,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T16:32:37.115Z","updated_at":"2026-04-20T06:34:02.041Z","avatar_url":"https://github.com/alpha74.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/user-attachments/assets/66e6548c-887d-4c39-a85a-1b7e5c40c61d\" width=\"200px\"\u003e\n\n\n## Pub-Sub Queue\n\n\n### Requirements\n\n1. API to expose topics\n   - print list of all topics\n2. API for publisher to push message against a topic\n3. API to subscribe and unsubscribe from a topic\n4. API for subscriber to consume from a topic\n5. Maintain the state of consumption of each message in each topic for each consumer\n6. Maintain order of message consumption for each consumer\n\n\n### Entities\n\n#### Message\n\n- String data\n- String publisherId\n\n#### Subscriber\n\n- Reads from a Topic\n- Can subscribe to single topic\n- name\n- topic -\u003e Topic or null\n- consume()\n\n#### Publisher\n\n- publishes to a Topic\n- can publish to multiple topics\n- name\n- publish(Message, Topic)\n\n#### Topic\n\n- name\n- List of Messages\n- Map of Subscribers vs offset\n\n\n### Services\n\n#### TopicService\n- createTopic(name)\n- getTopics()\n- deleteTopic()\n  - Fail if messages are pending to be consumed\n- isPresent() -\u003e checks if topic is present or not\n- getTopicByName()\n\n#### BrokerService\n\n- addSubscriber(Subscriber, Topic)\n- removeSubscriber(Subscriber)\n- publishMessage(Message, Publisher, Topic)\n- consumeMessage(Subscriber)\n\n\n--------\n\n\n#### Improvements which were suggested:\n\n1. Create separate Services for Publisher and Subscriber\n2. This implementation is Push and Pull, think of Publish and Subscribe\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpha74%2Fpub-sub-queue_javaspringboot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falpha74%2Fpub-sub-queue_javaspringboot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpha74%2Fpub-sub-queue_javaspringboot/lists"}