Skip to main content

Notification

Transient (non-persisted) system signals used for compensation signals, rejections, and real-time alerts.

Event vs Notification

AspectEventNotification
PersistedYes (event store)No (transient)
SequencedYesNo
ReplayCan be replayedLost after delivery
Use caseState changesSystem signals

Types of Notifications

RejectionNotification

Sent when a saga/PM command is rejected by the target aggregate. Contains:

  • Rejected command context
  • Rejection reason
  • Saga origin (for compensation routing)

Compensation Signals

Sent to trigger compensation flows when downstream operations fail.

When to Use

Use Events for:

  • Business state changes that need audit trail
  • Facts that might need replay
  • Cross-domain communication via sagas

Use Notifications for:

  • Error signals that trigger compensation
  • Real-time alerts that don't need persistence
  • System-level signals (health, metrics)