Skip to main content

ConsumerGroupMetadata

Trait ConsumerGroupMetadata 

Source
pub trait ConsumerGroupMetadata:
    Send
    + Sync
    + Debug
    + 'static {
    // Required methods
    fn group_id(&self) -> &str;
    fn generation_id(&self) -> i32;
    fn member_id(&self) -> &str;
    fn group_instance_id(&self) -> Option<&str>;
}
Expand description

A metadata struct containing the consumer group information.

Note: Any change to this class is considered public and requires a KIP.

§Translation notes

A trait, as in Kafka 5.0: see Consumer::group_metadata.

Required Methods§

Source

fn group_id(&self) -> &str

The consumer group ID.

§Returns

The group ID

Source

fn generation_id(&self) -> i32

The current generation ID, or -1 (UNKNOWN_GENERATION_ID) if unknown.

§Returns

The generation ID

Source

fn member_id(&self) -> &str

The member ID, or an empty string (UNKNOWN_MEMBER_ID) if unknown.

§Returns

The member ID

Source

fn group_instance_id(&self) -> Option<&str>

The group instance ID, if the consumer is a static member.

§Returns

The group instance ID, or empty if this is a dynamic member

Trait Implementations§

Source§

impl Display for dyn ConsumerGroupMetadata

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§