Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish/Subscribe pattern #2898

Open
iluwatar opened this issue Apr 7, 2024 · 10 comments
Open

Publish/Subscribe pattern #2898

iluwatar opened this issue Apr 7, 2024 · 10 comments

Comments

@iluwatar
Copy link
Owner

iluwatar commented Apr 7, 2024

Introduce the Publish/Subscribe pattern to provide a flexible event-handling system.

The Publish/Subscribe pattern is a messaging paradigm used in software architecture with several key points:

  • Decoupling of publishers and subscribers: Publishers and subscribers operate independently, and there's no direct link between them. This enhances the scalability and modularity of applications.

  • Event-driven communication: The pattern facilitates event-driven architectures by allowing publishers to broadcast events without concerning themselves with who receives the events.

  • Dynamic subscription: Subscribers can dynamically choose to listen for specific events or messages they are interested in, often by subscribing to a particular topic or channel.

  • Asynchronous processing: The pattern inherently supports asynchronous message processing, enabling efficient handling of events and improving application responsiveness.

  • Scalability: By decoupling senders and receivers, the pattern can support a large number of publishers and subscribers, making it suitable for scalable systems.

  • Flexibility and adaptability: New subscribers or publishers can be added to the system without significant changes to the existing components, making the system highly adaptable to evolving requirements.

Acceptance Criteria:

  • The implementation must follow the project's coding standards and directory structure as outlined in the contribution guidelines.
  • Comprehensive unit tests must cover the new pattern implementation, ensuring all major use cases are accounted for.
  • Documentation must be provided, explaining the pattern, its use cases, and how the implementation solves a particular problem, including UML diagrams where applicable.
@Ehspresso
Copy link
Contributor

I would like to take this issue.

@Ehspresso
Copy link
Contributor

Can I use Java Message Service to implement the pattern?

@iluwatar
Copy link
Owner Author

Sure, that should work fine

@Ehspresso
Copy link
Contributor

I have an implementation of the pattern. However I am finding it difficult to test since the implementation is quite basic given the asynchronous/threading code is handled by JMS which shouldn't be tested since its a third party software. I can create a pull request and the current tests can be viewed, perhaps you'll find it satisfactory. If not, I am happy to receive criticism to improve my testing, it can improve my knowledge.

@iluwatar
Copy link
Owner Author

Sure, let's see what you have

Ehspresso added a commit to Ehspresso/java-design-patterns that referenced this issue Apr 17, 2024
Ehspresso added a commit to Ehspresso/java-design-patterns that referenced this issue Apr 17, 2024
Ehspresso added a commit to Ehspresso/java-design-patterns that referenced this issue Apr 19, 2024
Ehspresso added a commit to Ehspresso/java-design-patterns that referenced this issue Apr 22, 2024
Ehspresso added a commit to Ehspresso/java-design-patterns that referenced this issue Apr 23, 2024
Copy link

stale bot commented Jun 16, 2024

This issue has been automatically marked as stale because it has not had recent activity. The issue will be unassigned if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status: stale issues and pull requests that have not had recent interaction label Jun 16, 2024
@stale stale bot removed the status: stale issues and pull requests that have not had recent interaction label Jun 17, 2024
@iluwatar iluwatar added info: help wanted status: stale issues and pull requests that have not had recent interaction labels Jun 17, 2024
@iluwatar iluwatar moved this from In Progress to Todo in Java Design Patterns project Jun 17, 2024
@stale stale bot removed the status: stale issues and pull requests that have not had recent interaction label Jun 17, 2024
@LuisGrigore
Copy link

Hi, I would like to give this a try.
This would be my first contribution so I may need some extra help if thats ok.

@iluwatar iluwatar moved this from Todo to In Progress in Java Design Patterns project Sep 11, 2024
Copy link

stale bot commented Nov 10, 2024

This issue has been automatically marked as stale because it has not had recent activity. The issue will be unassigned if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status: stale issues and pull requests that have not had recent interaction label Nov 10, 2024
@iluwatar iluwatar added info: help wanted and removed status: stale issues and pull requests that have not had recent interaction labels Nov 11, 2024
@iluwatar iluwatar moved this from In Progress to Todo in Java Design Patterns project Nov 11, 2024
@hungryDev399
Copy link

Hi! I am interested in implementing this pattern as it is crucial for IOT applications, which I have started working on recently, and it would be a good contribution to this work. Could you please assign this issue to me?

@AbhinandanSonvane
Copy link

Hi @iluwatar , Could we use Kafka Producer/Consumer implementation instead of the JMS for this Pub/Sub design pattern?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

5 participants