pub enum RecoveryStrategy {
Fail,
Skip,
RetryAndFail {
retries: usize,
delay: Duration,
},
RetryAndSkip {
retries: usize,
delay: Duration,
},
}Expand description
Per-handler-invocation recovery policy.
For single-envelope handlers the invocation unit is one envelope; for
grouped handlers it is the complete group. Handler failures are governed by
this policy and are intentionally separate from ProjectionError’s
fatal-versus-restartable infrastructure taxonomy.
Variants§
Fail
Do not retry; escalate immediately to projection restart.
Skip
Discard the failed invocation and continue.
RetryAndFail
Retry in order, then escalate to projection restart on exhaustion.
Fields
RetryAndSkip
Retry in order, then discard the invocation on exhaustion.
Implementations§
Source§impl RecoveryStrategy
impl RecoveryStrategy
Sourcepub const fn retry_and_fail() -> Self
pub const fn retry_and_fail() -> Self
Creates retry-then-fail recovery with the Akka defaults: five retries, one second apart.
Sourcepub const fn retry_and_skip() -> Self
pub const fn retry_and_skip() -> Self
Creates retry-then-skip recovery with the Akka defaults: five retries, one second apart.
Trait Implementations§
Source§impl Clone for RecoveryStrategy
impl Clone for RecoveryStrategy
impl Copy for RecoveryStrategy
Source§impl Debug for RecoveryStrategy
impl Debug for RecoveryStrategy
Source§impl Default for RecoveryStrategy
impl Default for RecoveryStrategy
impl Eq for RecoveryStrategy
Source§impl PartialEq for RecoveryStrategy
impl PartialEq for RecoveryStrategy
impl StructuralPartialEq for RecoveryStrategy
Auto Trait Implementations§
impl Freeze for RecoveryStrategy
impl RefUnwindSafe for RecoveryStrategy
impl Send for RecoveryStrategy
impl Sync for RecoveryStrategy
impl Unpin for RecoveryStrategy
impl UnsafeUnpin for RecoveryStrategy
impl UnwindSafe for RecoveryStrategy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<S> IntoEventHandlerResult<S> for S
impl<S> IntoEventHandlerResult<S> for S
Source§fn into_event_handler_result(self) -> Result<S, PersistenceError>
fn into_event_handler_result(self) -> Result<S, PersistenceError>
Converts this handler output into the runtime result.
Source§impl<T> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage