pub struct RetryHandler { /* private fields */ }Expand description
Middleware that handles automatic retries for failed messages with exponential backoff.
Implementations§
Source§impl RetryHandler
impl RetryHandler
Sourcepub fn new(config: RetryHandlerConfig) -> Self
pub fn new(config: RetryHandlerConfig) -> Self
Creates a new RetryHandler with the given configuration.
Trait Implementations§
Source§impl Middleware for RetryHandler
impl Middleware for RetryHandler
Source§fn handle<'life0, 'async_trait>(
&'life0 self,
message: ReceivedMessage<Value>,
next: Box<dyn MessageHandler>,
) -> Pin<Box<dyn Future<Output = Result<MiddlewareResult, WorkerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle<'life0, 'async_trait>(
&'life0 self,
message: ReceivedMessage<Value>,
next: Box<dyn MessageHandler>,
) -> Pin<Box<dyn Future<Output = Result<MiddlewareResult, WorkerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Process a message with access to the next handler in the chain. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for RetryHandler
impl !UnwindSafe for RetryHandler
impl Freeze for RetryHandler
impl Send for RetryHandler
impl Sync for RetryHandler
impl Unpin for RetryHandler
impl UnsafeUnpin for RetryHandler
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