pub struct ClassicProtocol { /* private fields */ }Expand description
The classic protocol: JoinGroup, SyncGroup, Heartbeat.
Implementations§
Source§impl ClassicProtocol
impl ClassicProtocol
pub fn new( group_id: impl Into<String>, topics: Vec<String>, assignor: Box<dyn Assignor>, ) -> Self
pub fn member(&self) -> &GroupMember
Sourcepub fn set_session_timeout(&mut self, ms: i32)
pub fn set_session_timeout(&mut self, ms: i32)
How long the coordinator waits for a heartbeat before removing us.
Sourcepub fn set_rebalance_timeout(&mut self, ms: i32)
pub fn set_rebalance_timeout(&mut self, ms: i32)
How long the coordinator waits for every member to rejoin. Should exceed the longest a caller can spend between polls, or a slow consumer is dropped mid-rebalance.
Trait Implementations§
Source§impl<T: Transport> GroupProtocol<T> for ClassicProtocol
impl<T: Transport> GroupProtocol<T> for ClassicProtocol
Source§async fn advance(&mut self, cluster: &mut Cluster<T>) -> Result<Membership>
async fn advance(&mut self, cluster: &mut Cluster<T>) -> Result<Membership>
Drive one step of membership. Called until it reports
Membership
stable.Source§async fn commit(
&mut self,
cluster: &mut Cluster<T>,
offsets: &BTreeMap<TopicPartition, i64>,
) -> Result<()>
async fn commit( &mut self, cluster: &mut Cluster<T>, offsets: &BTreeMap<TopicPartition, i64>, ) -> Result<()>
Commit these offsets for the group. Read more
Source§fn topics(&self) -> Vec<String>
fn topics(&self) -> Vec<String>
What this member is subscribed to, so the caller can watch those topics
for changes the group must agree on.
Source§fn request_rejoin(&mut self)
fn request_rejoin(&mut self)
Ask to rejoin the group at the next
Self::advance. Read moreSource§fn group_metadata(&self) -> Option<GroupMetadata>
fn group_metadata(&self) -> Option<GroupMetadata>
What proves this member is current, for a transactional producer. Read more
Source§async fn committed(
&mut self,
cluster: &mut Cluster<T>,
partitions: &[TopicPartition],
) -> Result<BTreeMap<TopicPartition, i64>>
async fn committed( &mut self, cluster: &mut Cluster<T>, partitions: &[TopicPartition], ) -> Result<BTreeMap<TopicPartition, i64>>
Where this group last committed, for the partitions given. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ClassicProtocol
impl !Send for ClassicProtocol
impl !Sync for ClassicProtocol
impl !UnwindSafe for ClassicProtocol
impl Freeze for ClassicProtocol
impl Unpin for ClassicProtocol
impl UnsafeUnpin for ClassicProtocol
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