Skip to content

How Take Action For "Side Effects" #342

Answered by AlmarAubel
NecatiKaya asked this question in General
Discussion options

You must be logged in to vote

Both domain events and notification events can have multiple handlers — and that’s exactly the point. It keeps the system decoupled and scalable.

  • Use domain events for internal coordination within a module. (handled in process)
  • Use notification events for things outside the core domain (e.g., sending emails). (handle out-of-proces)
  • Use integration events over a message bus to communicate between modules.

Example:

  • MeetingCreatedDomainEvent → multiple internal handlers
  • MeetingCreatedNotification → external side effects
  • MeetingCreatedIntegrationEvent → published across modules

See also module integration

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@NecatiKaya
Comment options

@waqasdotnet
Comment options

Answer selected by NecatiKaya
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants