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

Microservice pattern: Domain event #2670

Open
iluwatar opened this issue Oct 15, 2023 · 0 comments
Open

Microservice pattern: Domain event #2670

iluwatar opened this issue Oct 15, 2023 · 0 comments

Comments

@iluwatar
Copy link
Owner

iluwatar commented Oct 15, 2023

Description

The Microservices - Domain Event design pattern is used to achieve a reliable communication mechanism between microservices. This pattern ensures that different services can react to changes or events occurring in other services without needing to tightly couple their operations. By leveraging domain events, we can decouple services, ensuring scalability and maintainability.

Main Elements of the Pattern:

  1. Domain Events: Represent significant state changes within a service that other services might be interested in.
  2. Event Publisher: The component within a service that publishes the domain event to an event broker.
  3. Event Broker: A middleware that handles the distribution of domain events to subscribing services.
  4. Event Subscriber: The component within a service that subscribes to domain events and reacts accordingly.

Benefits:

  • Decoupling: Services do not need to directly communicate with each other, promoting loose coupling.
  • Scalability: Each service can be scaled independently.
  • Maintainability: Changes in one service do not directly affect other services, making the system easier to maintain.

References

  1. Microservices Architecture
  2. Domain Event Pattern
  3. Project Contribution Guidelines
  4. Domain Event in Microservices

Acceptance Criteria

  1. Implement the Domain Event design pattern in the project, including event publishers and subscribers.
  2. Ensure proper documentation and examples are provided for the implemented pattern.
  3. Add unit tests to verify the correct functioning of the domain events, including publishing and subscribing mechanisms.
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

1 participant