pub struct BatchProcessor { /* private fields */ }Expand description
Batch processor for processing messages in groups
Implementations§
Source§impl BatchProcessor
impl BatchProcessor
Sourcepub fn with_batch_size(self, size: usize) -> Self
pub fn with_batch_size(self, size: usize) -> Self
Set the batch size
Sourcepub fn with_timeout_ms(self, timeout_ms: u64) -> Self
pub fn with_timeout_ms(self, timeout_ms: u64) -> Self
Set the timeout in milliseconds
Sourcepub fn create_batches(&self, messages: Vec<Message>) -> Vec<MessageBatch>
pub fn create_batches(&self, messages: Vec<Message>) -> Vec<MessageBatch>
Create batches from a vector of messages
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BatchProcessor
impl RefUnwindSafe for BatchProcessor
impl Send for BatchProcessor
impl Sync for BatchProcessor
impl Unpin for BatchProcessor
impl UnwindSafe for BatchProcessor
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