Skip to main content

Module consumer

Module consumer 

Source
Expand description

Consumer types (org.apache.kafka.clients.consumer).

Translated from org.apache.kafka.clients.consumer. The clients Java package segment is intentionally dropped per CLAUDE.md §2.

Re-exports§

pub use close_options::CloseOptions;
pub use close_options::GroupMembershipOperation;

Modules§

close_options
Options for closing a consumer.
consumer_partition_assignor
Data holders for the consumer partition assignor protocol.

Structs§

ConsumerCommitFailedError
An offset commit could not be completed because the group rebalanced.
ConsumerConfig
Configuration for the Kafka Consumer.
ConsumerHandle
A Clone + Send + Sync handle to a consumer that exposes Consumer::wakeup and the reentrant-safe consumer operations, callable from a task or thread other than the one owning the consumer.
ConsumerLogTruncationError
Log truncation was detected: the broker’s log diverges from the offsets the consumer had fetched.
ConsumerNoOffsetForPartitionError
No offset is defined for one or more partitions and no reset policy is set.
ConsumerOffsetOutOfRangeError
A fetch asked for an offset outside the range the broker retains.
ConsumerRecord
A key/value pair received from Kafka.
ConsumerRecordOptions
Every parameter of Java’s widest ConsumerRecord constructor (ConsumerRecord.java:138).
ConsumerRecordOptionsBuilder
Fluent builder for ConsumerRecordOptions.
ConsumerRecords
A container that holds the list of ConsumerRecord per partition for a particular topic.
ConsumerRetriableCommitFailedError
An offset commit failed with a retriable error; committing the latest consumed offsets again may succeed.
KafkaConsumer
The public entry point for constructing a Consumer.
MockConsumer
A mock of the Consumer interface, intended for testing code that uses Kafka.
OffsetAndMetadata
The Kafka offset commit API allows users to provide additional metadata (in the form of a string) when an offset is committed. This can be useful (for example) to store information about which node made the commit, what time the commit was made, etc.
OffsetAndTimestamp
A container class for offset and timestamp.
SubscriptionPattern
Represents a regular expression compatible with Google RE2/J, used to subscribe to topics.

Enums§

GroupProtocol
The group protocol that the consumer uses.

Traits§

Consumer
The single dispatch trait that MockConsumer (Phase 3) and AsyncKafkaConsumer (Phase 11) both implement. Translates Java’s org.apache.kafka.clients.consumer.Consumer<K, V> interface.
ConsumerGroupMetadata
The consumer group information: group id, generation id, member id and group instance id.
ConsumerInterceptor
A plugin interface that allows you to intercept (and possibly mutate) records received by the consumer. A primary use-case is for third-party components to hook into the consumer applications for custom monitoring, logging, etc.
ConsumerRebalanceListener
A callback interface that the user can implement to trigger custom actions when the set of partitions assigned to the consumer changes.
OffsetCommitCallback
A callback interface that the user can implement to trigger custom actions when a commit request completes.