0
0
Microservicessystem_design~12 mins

Event types (domain, integration, notification) in Microservices - Architecture Diagram

Choose your learning style9 modes available
System Overview - Event types (domain, integration, notification)

This system demonstrates three key event types used in microservices: domain events, integration events, and notification events. Domain events capture changes within a service's own data. Integration events enable communication between different services. Notification events inform users or external systems about important updates.

Architecture Diagram
User
  |
  v
Notification Service
  |
  v
Event Broker (Message Queue)
  /      |         \
 /       |          \
Service A  Service B  Service C
  |          |          |
  v          v          v
Domain DB  Integration DB  Notification DB
Components
User
external_user
Receives notifications about system events
Notification Service
service
Sends notification events to users or external systems
Event Broker (Message Queue)
message_queue
Routes events between services asynchronously
Service A
service
Generates domain events and consumes integration events
Service B
service
Consumes integration events and may generate new domain events
Service C
service
Consumes integration events and triggers notification events
Domain DB
database
Stores data for Service A including domain event state
Integration DB
database
Stores data for Service B related to integration events
Notification DB
database
Stores notification event history and user preferences
Request Flow - 6 Hops
Service AEvent Broker (Message Queue)
Event Broker (Message Queue)Service B
Service BEvent Broker (Message Queue)
Event Broker (Message Queue)Service C
Service CNotification Service
Notification ServiceUser
Failure Scenario
Component Fails:Event Broker (Message Queue)
Impact:Events cannot be routed between services, causing delays or loss of domain, integration, and notification events
Mitigation:Use a highly available message queue cluster with replication and failover to maintain event flow
Architecture Quiz - 3 Questions
Test your understanding
Which event type is generated within a service to represent internal state changes?
AIntegration event
BDomain event
CNotification event
DAPI event
Design Principle
This architecture shows how different event types enable clear separation of concerns: domain events handle internal changes, integration events enable service communication, and notification events inform users. Using an event broker decouples services and supports asynchronous, scalable communication.