Skip to main content

AssignmentHandle

Trait AssignmentHandle 

Source
pub trait AssignmentHandle: Send + Sync {
    // Required methods
    fn add(&self, start: PartitionStart);
    fn remove(&self, partition: i32);
    fn assigned(&self) -> Vec<i32>;
}
Expand description

Runtime control over a live MetadataEventLog subscription’s assigned partition set. MetadataEventLog::subscribe returns it together with the stream.

Required Methods§

Source

fn add(&self, start: PartitionStart)

Begin to consume start.partition from start.start_offset. This method does nothing if the partition is already assigned. A newly-added partition emits its backlog from start_offset into the existing stream, and then live records.

Source

fn remove(&self, partition: i32)

Stop the consumption of partition and stop the emission of its events. This method does nothing if the partition is not currently assigned.

Source

fn assigned(&self) -> Vec<i32>

Current assigned partition set (unordered).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§