OffsetStore

Trait OffsetStore 

Source
pub trait OffsetStore {
    // Required methods
    fn commit(&mut self, topic: &str, partition: u32, group: &str, offset: u64);
    fn fetch(&self, topic: &str, partition: u32, group: &str) -> Option<u64>;
}
Expand description

Trait for persisting consumer offsets.

Required Methods§

Source

fn commit(&mut self, topic: &str, partition: u32, group: &str, offset: u64)

Commit the offset for a given topic/partition/group.

Source

fn fetch(&self, topic: &str, partition: u32, group: &str) -> Option<u64>

Fetch the last committed offset for a given topic/partition/group. Returns None if no offset has been committed.

Implementors§