pub struct BackpressureManager {
pub lag_threshold: u64,
pub pending_ack_threshold: i64,
pub response_actions: Vec<BackpressureAction>,
}Expand description
Backpressure detection and management
Fields§
§lag_threshold: u64Threshold for consumer lag (messages)
pending_ack_threshold: i64Threshold for pending acks
response_actions: Vec<BackpressureAction>Backpressure response actions
Implementations§
Source§impl BackpressureManager
impl BackpressureManager
Sourcepub fn should_apply_backpressure(
&self,
consumer_lag: u64,
pending_acks: i64,
) -> bool
pub fn should_apply_backpressure( &self, consumer_lag: u64, pending_acks: i64, ) -> bool
Check if backpressure should be applied
Sourcepub fn generate_backpressure_response(
&self,
consumer_lag: u64,
pending_acks: i64,
) -> Vec<BackpressureAction>
pub fn generate_backpressure_response( &self, consumer_lag: u64, pending_acks: i64, ) -> Vec<BackpressureAction>
Generate backpressure response
Trait Implementations§
Source§impl Clone for BackpressureManager
impl Clone for BackpressureManager
Source§fn clone(&self) -> BackpressureManager
fn clone(&self) -> BackpressureManager
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 BackpressureManager
impl Debug for BackpressureManager
Auto Trait Implementations§
impl Freeze for BackpressureManager
impl RefUnwindSafe for BackpressureManager
impl Send for BackpressureManager
impl Sync for BackpressureManager
impl Unpin for BackpressureManager
impl UnsafeUnpin for BackpressureManager
impl UnwindSafe for BackpressureManager
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