Notification
Notification
Section titled “Notification”Transient (non-persisted) system signals used for compensation signals, rejections, and real-time alerts.
Event vs Notification
Section titled “Event vs Notification”| Aspect | Event | Notification |
|---|---|---|
| Persisted | Yes (event store) | No (transient) |
| Sequenced | Yes | No |
| Replay | Can be replayed | Lost after delivery |
| Use case | State changes | System signals |
Types of Notifications
Section titled “Types of Notifications”RejectionNotification
Section titled “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
Section titled “Compensation Signals”Sent to trigger compensation flows when downstream operations fail.
When to Use
Section titled “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)