pub struct ConsumerGroup {
pub last_delivered_id: StreamId,
pub pel: BTreeMap<StreamId, PelEntry>,
pub consumers: KevyMap<SmallBytes, Box<ConsumerState>>,
}Expand description
One consumer group’s state. Sorted PEL plus a map of known consumers (with cached pel_count for O(1) XINFO answers).
Fields§
§last_delivered_id: StreamIdHighest ID delivered to any consumer in this group. Bumped by
XREADGROUP with >; settable via XGROUP SETID.
pel: BTreeMap<StreamId, PelEntry>Pending-Entries List: every ID delivered but not yet ACKed.
Sorted by ID for XPENDING start end range queries.
consumers: KevyMap<SmallBytes, Box<ConsumerState>>Consumers known to this group (by name).
Implementations§
Source§impl ConsumerGroup
impl ConsumerGroup
Sourcepub fn last_delivered_id(&self) -> StreamId
pub fn last_delivered_id(&self) -> StreamId
Highest ID delivered by this group — for XINFO GROUPS.
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Total pending entries — XINFO GROUPS’s pending.
Sourcepub fn consumer_count(&self) -> usize
pub fn consumer_count(&self) -> usize
Known consumer count — XINFO GROUPS’s consumers.
Sourcepub fn consumers_iter(&self) -> impl Iterator<Item = (&[u8], &ConsumerState)>
pub fn consumers_iter(&self) -> impl Iterator<Item = (&[u8], &ConsumerState)>
Iterate (consumer_name, consumer) pairs — XINFO CONSUMERS.
Trait Implementations§
Source§impl Clone for ConsumerGroup
impl Clone for ConsumerGroup
Source§fn clone(&self) -> ConsumerGroup
fn clone(&self) -> ConsumerGroup
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 moreAuto Trait Implementations§
impl Freeze for ConsumerGroup
impl RefUnwindSafe for ConsumerGroup
impl Send for ConsumerGroup
impl Sync for ConsumerGroup
impl Unpin for ConsumerGroup
impl UnsafeUnpin for ConsumerGroup
impl UnwindSafe for ConsumerGroup
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