GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - alpha74/Pub-Sub-Queue_JavaSpringBoot: Code for Pub-Sub queue implementation using Java Spring Boot.

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

Repository files navigation

Pub-Sub Queue

Requirements

  1. API to expose topics
    • print list of all topics
  2. API for publisher to push message against a topic
  3. API to subscribe and unsubscribe from a topic
  4. API for subscriber to consume from a topic
  5. Maintain the state of consumption of each message in each topic for each consumer
  6. Maintain order of message consumption for each consumer

Entities

Message

  • String data
  • String publisherId

Subscriber

  • Reads from a Topic
  • Can subscribe to single topic
  • name
  • topic -> Topic or null
  • consume()

Publisher

  • publishes to a Topic
  • can publish to multiple topics
  • name
  • publish(Message, Topic)

Topic

  • name
  • List of Messages
  • Map of Subscribers vs offset

Services

TopicService

  • createTopic(name)
  • getTopics()
  • deleteTopic()
    • Fail if messages are pending to be consumed
  • isPresent() -> checks if topic is present or not
  • getTopicByName()

BrokerService

  • addSubscriber(Subscriber, Topic)
  • removeSubscriber(Subscriber)
  • publishMessage(Message, Publisher, Topic)
  • consumeMessage(Subscriber)

Improvements which were suggested:

  1. Create separate Services for Publisher and Subscriber
  2. This implementation is Push and Pull, think of Publish and Subscribe

About

Code for Pub-Sub queue implementation using Java Spring Boot.

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.