Table of Contents

Enum RetryClassification

Namespace
Trellis
Assembly
Trellis.Core.dll

Transport-neutral classification of Error values for outer retry loops (background workers, message-broker consumers, outbound-gateway callers). Answers the question "given this failure, what should the surrounding job do next?" without committing to any specific transport or retry policy.

public enum RetryClassification

Fields

FailFast = 2

The failure cannot be recovered in-process and indicates a precondition for the whole job is no longer met (e.g. credentials revoked). The caller should halt the surrounding batch / consumer loop rather than process further items.

Permanent = 1

Retrying the same operation will not change the outcome. The caller should drop this work item, surface the failure to its observability sink, and move on to the next item.

Transient = 0

Retrying the same operation later is likely to succeed. Honour any RetryAdvice returned by GetRetryAdvice(Error) when scheduling the retry; fall back to the consumer's default backoff policy when no advice is present.

Remarks

Three values are defined; the numeric ordering encodes severity so that Classify(Error) can use max semantics when classifying an Error.Aggregate: Transient < Permanent < FailFast. Consumers should treat the ordering as an implementation detail and prefer pattern matching on the enum members rather than numeric comparisons.