pub struct ConsumerGroupManager { /* private fields */ }Expand description
Manages consumer groups for the Kafka broker
Implementations§
Source§impl ConsumerGroupManager
impl ConsumerGroupManager
Sourcepub fn groups(&self) -> &HashMap<String, ConsumerGroup>
pub fn groups(&self) -> &HashMap<String, ConsumerGroup>
Get a reference to all groups (for internal use)
Sourcepub async fn join_group(
&mut self,
group_id: &str,
member_id: &str,
client_id: &str,
) -> Result<JoinGroupResponse, Error>
pub async fn join_group( &mut self, group_id: &str, member_id: &str, client_id: &str, ) -> Result<JoinGroupResponse, Error>
Join a consumer group
Sourcepub async fn sync_group(
&mut self,
group_id: &str,
assignments: Vec<PartitionAssignment>,
topics: &HashMap<String, Topic>,
) -> Result<(), Error>
pub async fn sync_group( &mut self, group_id: &str, assignments: Vec<PartitionAssignment>, topics: &HashMap<String, Topic>, ) -> Result<(), Error>
Sync group assignment
Sourcepub async fn commit_offsets(
&mut self,
group_id: &str,
offsets: HashMap<(String, i32), i64>,
) -> Result<(), Error>
pub async fn commit_offsets( &mut self, group_id: &str, offsets: HashMap<(String, i32), i64>, ) -> Result<(), Error>
Commit consumer offsets
Sourcepub fn get_committed_offsets(
&self,
group_id: &str,
) -> HashMap<(String, i32), i64>
pub fn get_committed_offsets( &self, group_id: &str, ) -> HashMap<(String, i32), i64>
Get committed offsets for a group
Sourcepub async fn simulate_lag(
&mut self,
group_id: &str,
topic: &str,
lag: i64,
topics: &HashMap<String, Topic>,
)
pub async fn simulate_lag( &mut self, group_id: &str, topic: &str, lag: i64, topics: &HashMap<String, Topic>, )
Simulate consumer lag
Sourcepub async fn trigger_rebalance(&mut self, group_id: &str)
pub async fn trigger_rebalance(&mut self, group_id: &str)
Trigger rebalance for a group
Trait Implementations§
Source§impl Debug for ConsumerGroupManager
impl Debug for ConsumerGroupManager
Auto Trait Implementations§
impl Freeze for ConsumerGroupManager
impl RefUnwindSafe for ConsumerGroupManager
impl Send for ConsumerGroupManager
impl Sync for ConsumerGroupManager
impl Unpin for ConsumerGroupManager
impl UnwindSafe for ConsumerGroupManager
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