#[non_exhaustive]pub enum DelayedRetry {
DurableZset {
key: String,
ttl: Option<Duration>,
},
}Expand description
How a subscription should handle retry_after / nack_after delays.
Passed to RedisStream::delayed_retry. There is no default
that enables it: a delay queue costs extra Redis keys, memory, and the polling sweeper, so a user
opts in and names the ZSET key explicitly (the key has no sane default).
§Examples
use std::time::Duration;
use ruststream_fred::{DelayedRetry, RedisStream};
let sub = RedisStream::new("orders").group("workers").delayed_retry(
DelayedRetry::DurableZset { key: "orders.delayed".to_owned(), ttl: None },
);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
DurableZset
Schedule delayed redeliveries in the named ZSET.
key is the ZSET delay-queue key (required, no default). ttl, when set, PEXPIREs the
key on every write so an abandoned queue cleans itself up; it must exceed the longest
scheduled retry_after delay, or pending entries are dropped before they fire.
Trait Implementations§
Source§impl Clone for DelayedRetry
impl Clone for DelayedRetry
Source§fn clone(&self) -> DelayedRetry
fn clone(&self) -> DelayedRetry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DelayedRetry
impl RefUnwindSafe for DelayedRetry
impl Send for DelayedRetry
impl Sync for DelayedRetry
impl Unpin for DelayedRetry
impl UnsafeUnpin for DelayedRetry
impl UnwindSafe for DelayedRetry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more