pub struct BatchConfig {
pub batch_size: usize,
pub flush_interval: Duration,
pub wait_for_full_batch: bool,
pub processing_timeout: Duration,
}Expand description
Configuration for batch processing
Fields§
§batch_size: usizeMaximum number of messages per batch
flush_interval: DurationMaximum time to wait before flushing (even if batch not full)
wait_for_full_batch: boolWhether to wait for full batch before processing
processing_timeout: DurationTimeout for batch processing
Implementations§
Source§impl BatchConfig
impl BatchConfig
Sourcepub fn with_batch_size(self, size: usize) -> Self
pub fn with_batch_size(self, size: usize) -> Self
Create a new batch config with custom batch size
Sourcepub fn with_flush_interval(self, interval: Duration) -> Self
pub fn with_flush_interval(self, interval: Duration) -> Self
Set the flush interval
Sourcepub fn wait_for_full_batch(self, wait: bool) -> Self
pub fn wait_for_full_batch(self, wait: bool) -> Self
Configure whether to wait for full batch
Sourcepub fn with_processing_timeout(self, timeout: Duration) -> Self
pub fn with_processing_timeout(self, timeout: Duration) -> Self
Set processing timeout
Trait Implementations§
Source§impl Clone for BatchConfig
impl Clone for BatchConfig
Source§fn clone(&self) -> BatchConfig
fn clone(&self) -> BatchConfig
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 moreSource§impl Debug for BatchConfig
impl Debug for BatchConfig
Auto Trait Implementations§
impl Freeze for BatchConfig
impl RefUnwindSafe for BatchConfig
impl Send for BatchConfig
impl Sync for BatchConfig
impl Unpin for BatchConfig
impl UnsafeUnpin for BatchConfig
impl UnwindSafe for BatchConfig
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