Table of Contents

Interface IMessageFailureClassifier

Namespace
Excalibur.Dispatch
Assembly
Excalibur.Dispatch.Abstractions.dll

Classifies an exception raised while processing a message into a MessageFailureKind, so that resilience-aware components share one consistent "retry vs. dead-letter" decision.

public interface IMessageFailureClassifier
Extension Methods

Remarks

A single classifier is consumed by the retry middleware, retry policies, the outbox/inbox processors, and the change-data-capture processors. Centralising the taxonomy here guarantees a transient transport blip is retried — and a poison message is dead-lettered — identically across every path, rather than each component re-deriving its own divergent rules.

Implementations MUST be deterministic, free of side effects, and safe to call concurrently. They MUST NOT throw on the hot path: classification returns a value for every input (an unrecognised failure resolves to Unknown). Unknown does not authorize automatic retry or loss of durable work; consumers retain it for explicit classification and recovery.

Methods

Classify(Exception)

Classifies the supplied exception into a MessageFailureKind.

MessageFailureKind Classify(Exception exception)

Parameters

exception Exception

The exception that caused the message-processing failure.

Returns

MessageFailureKind

The failure classification: Transient for a retryable failure, Permanent for a non-retryable operation failure, or Poison for a defective message that must be dead-lettered immediately; Uncertain for ambiguous delivery acceptance; or Unknown when recovery behavior is not established.

Exceptions

ArgumentNullException

Thrown when exception is null.