Trait rdkafka::consumer::Consumer [] [src]

pub trait Consumer<C: ConsumerContext> {
    fn get_base_consumer(&self) -> &BaseConsumer<C>;
    fn get_base_consumer_mut(&mut self) -> &mut BaseConsumer<C>;

    fn subscribe(&mut self, topics: &Vec<&str>) -> KafkaResult<()> { ... }
    fn assign(&mut self, assignment: &TopicPartitionList) -> KafkaResult<()> { ... }
    fn commit(&self,
              topic_partition_list: &TopicPartitionList,
              mode: CommitMode)
              -> KafkaResult<()> { ... } fn commit_message(&self,
                      message: &Message,
                      mode: CommitMode)
                      -> KafkaResult<()> { ... } fn subscription(&self) -> KafkaResult<TopicPartitionList> { ... } fn assignment(&self) -> KafkaResult<TopicPartitionList> { ... } fn committed(&self, timeout_ms: i32) -> KafkaResult<TopicPartitionList> { ... } fn position(&self) -> KafkaResult<TopicPartitionList> { ... } fn fetch_metadata(&self, timeout_ms: i32) -> KafkaResult<Metadata> { ... } fn fetch_watermarks(&self,
                        topic: &str,
                        partition: i32,
                        timeout_ms: i32)
                        -> KafkaResult<(i64, i64)> { ... } }

Common trait for all consumers.

Required Methods

Returns a reference to the BaseConsumer.

Returns a mutable reference to the BaseConsumer.

Provided Methods

Subscribe the consumer to a list of topics.

Manually assign topics and partitions to the consumer.

Commit offsets on broker for the provided list of partitions. If mode is set to CommitMode::Sync, the call will block until the message has been succesfully committed.

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

Returns the current topic subscription.

Returns the current partition assignment.

Retrieve committed offsets for topics and partitions.

Retrieve current positions (offsets) for topics and partitions.

Returns the metadata information for all the topics in the cluster.

Returns the metadata information for all the topics in the cluster.

Implementors