pub struct RetryPolicyBuilder { /* private fields */ }Expand description
Builder for RetryPolicy
Implementations§
Source§impl RetryPolicyBuilder
impl RetryPolicyBuilder
Sourcepub fn max_retries(self, max_retries: u32) -> Self
pub fn max_retries(self, max_retries: u32) -> Self
Set maximum number of retry attempts
Sourcepub fn initial_delay(self, delay: Duration) -> Self
pub fn initial_delay(self, delay: Duration) -> Self
Set initial delay between retries
Sourcepub fn backoff_multiplier(self, multiplier: f64) -> Self
pub fn backoff_multiplier(self, multiplier: f64) -> Self
Set backoff multiplier for exponential backoff
Sourcepub fn dead_letter_exchange<S: Into<String>>(self, exchange: S) -> Self
pub fn dead_letter_exchange<S: Into<String>>(self, exchange: S) -> Self
Set dead letter exchange name
Sourcepub fn dead_letter_queue<S: Into<String>>(self, queue: S) -> Self
pub fn dead_letter_queue<S: Into<String>>(self, queue: S) -> Self
Set dead letter queue name
Sourcepub fn no_dead_letter(self) -> Self
pub fn no_dead_letter(self) -> Self
Disable dead letter exchange (messages will be discarded after max retries)
Sourcepub fn retry_queue_pattern<S: Into<String>>(self, pattern: S) -> Self
pub fn retry_queue_pattern<S: Into<String>>(self, pattern: S) -> Self
Set retry queue naming pattern
Sourcepub fn fast_preset(self) -> Self
pub fn fast_preset(self) -> Self
Configure for fast retries (preset)
Sourcepub fn slow_preset(self) -> Self
pub fn slow_preset(self) -> Self
Configure for slow retries (preset)
Sourcepub fn linear_preset(self, delay: Duration) -> Self
pub fn linear_preset(self, delay: Duration) -> Self
Configure for linear retries (preset)
Sourcepub fn build(self) -> RetryPolicy
pub fn build(self) -> RetryPolicy
Build the final RetryPolicy
Trait Implementations§
Source§impl Clone for RetryPolicyBuilder
impl Clone for RetryPolicyBuilder
Source§fn clone(&self) -> RetryPolicyBuilder
fn clone(&self) -> RetryPolicyBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RetryPolicyBuilder
impl Debug for RetryPolicyBuilder
Auto Trait Implementations§
impl Freeze for RetryPolicyBuilder
impl RefUnwindSafe for RetryPolicyBuilder
impl Send for RetryPolicyBuilder
impl Sync for RetryPolicyBuilder
impl Unpin for RetryPolicyBuilder
impl UnwindSafe for RetryPolicyBuilder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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