pub struct EventProcessorBuilder { /* private fields */ }Expand description
Implementations§
Source§impl EventProcessorBuilder
impl EventProcessorBuilder
Sourcepub fn with_handler(self, handler: Box<dyn EventHandler>) -> Self
pub fn with_handler(self, handler: Box<dyn EventHandler>) -> Self
Register an event handler
Sourcepub fn with_poll_interval(self, interval: Duration) -> Self
pub fn with_poll_interval(self, interval: Duration) -> Self
Set the poll interval (how often to check for new events)
Sourcepub fn with_batch_size(self, size: usize) -> Self
pub fn with_batch_size(self, size: usize) -> Self
Set the batch size (how many events to process at once)
Sourcepub fn with_error_strategy(self, strategy: ErrorStrategy) -> Self
pub fn with_error_strategy(self, strategy: ErrorStrategy) -> Self
Set the error handling strategy
Sourcepub fn with_dead_letter_queue(self, dlq: Arc<DeadLetterQueue>) -> Self
pub fn with_dead_letter_queue(self, dlq: Arc<DeadLetterQueue>) -> Self
Enable dead letter queue
Sourcepub fn build(self, conn: Arc<Connection>) -> EventProcessor
pub fn build(self, conn: Arc<Connection>) -> EventProcessor
Build the event processor
Auto Trait Implementations§
impl Freeze for EventProcessorBuilder
impl !RefUnwindSafe for EventProcessorBuilder
impl !Send for EventProcessorBuilder
impl !Sync for EventProcessorBuilder
impl Unpin for EventProcessorBuilder
impl !UnwindSafe for EventProcessorBuilder
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