Struct rdkafka::consumer::base_consumer::BaseConsumer [] [src]

pub struct BaseConsumer<C: ConsumerContext> { /* fields omitted */ }

Low level wrapper around the librdkafka consumer. This consumer requires to be periodically polled to make progress on rebalance, callbacks and to receive messages.

Methods

impl<C: ConsumerContext> BaseConsumer<C>
[src]

Subscribes the consumer to a list of topics and/or topic sets (using regex). Strings starting with ^ will be regex-matched to the full list of topics in the cluster and matching topics will be added to the subscription list.

Unsubscribe from previous subscription list.

Manually assign topics and partitions to consume.

Returns a list of topics or topic patterns the consumer is subscribed to.

Polls the consumer for events. It won't block more than the specified timeout.

Commits the current message. The commit can be synk (blocking), or asynk.

Trait Implementations

impl<C: ConsumerContext> Consumer<C> for BaseConsumer<C>
[src]

Returns a reference to the BaseConsumer.

Returns a mutable reference to the BaseConsumer.

Subscribe the consumer to a list of topics.

Manually assign topics and partitions to the consumer.

Commit a specific message. If mode is set to CommitMode::Sync, the call will block until the message has been succesfully committed. Read more

impl FromClientConfig for BaseConsumer<EmptyConsumerContext>
[src]

impl<C: ConsumerContext> FromClientConfigAndContext<C> for BaseConsumer<C>
[src]

Creates a new BaseConsumer starting from a ClientConfig.

impl<C: ConsumerContext> Drop for BaseConsumer<C>
[src]

A method called when the value goes out of scope. Read more