Skip to main content

FailurePolicy

Type Alias FailurePolicy 

Source
pub type FailurePolicy = SubscriptionPolicy;
👎Deprecated since 0.3.3:

renamed to SubscriptionPolicy

Aliased Type§

pub struct FailurePolicy {
    pub priority: i32,
    pub max_retries: usize,
    pub retry_strategy: Option<RetryStrategy>,
    pub dead_letter: bool,
}

Fields§

§priority: i32

Listener ordering hint (higher runs first).

Applied independently within sync and async lanes.

§max_retries: usize

Number of additional attempts after the first failure (0 = no retries).

Only honoured for async handlers. Sync handlers always behave as if this is 0.

§retry_strategy: Option<RetryStrategy>

Optional back-off strategy between retry attempts.

None means retry immediately. Ignored when max_retries is 0.

§dead_letter: bool

Emit a DeadLetter event after all attempts are exhausted.

Automatically forced to false for dead-letter listeners.