Enum SagaEventOutcome
Whether a saga actually acted on an event it was given.
public enum SagaEventOutcome
- Extension Methods
Fields
Declined = 0The saga declined to act: a handler was found, and its condition was not met.
The event is NOT recorded as processed, so it remains deliverable. This is the correct outcome for a message that arrives before the saga is ready for it — it is deferred, not discarded. It is the default so that a handler which somehow reports nothing is treated as not having acted, which is the safe direction: the cost is a redelivery, not a lost message.
Handled = 1The saga acted on the event.
The event is recorded as processed and that record is persisted with the state the handler produced, so a redelivery inside the dedup window will not run it again.
Remarks
This exists because a saga that declines is indistinguishable from one that acts, if the only
signal is a bare Task. A handler guarded by a condition returns without doing anything
when the condition is false. The coordinator could not see that, so it recorded the event as
processed and persisted the record — permanently retiring a message that no handler had touched.
A message arriving before its guard was satisfiable was never redelivered.
The remedy is not a log line: a log is observable to an operator reading it afterwards, never to the caller deciding what to do next. The refusal has to be a value the caller can branch on, which is what this is.
It is deliberately two states and not three. "The saga has no handler for this type at all" is a
different question, answered before delivery by HandlesEvent, and folding it in here would
let a routing miss and a deliberate decline share one value again — which is the conflation that
produced the defect.