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§
- Consumer
Commit Failed Error - An offset commit could not be completed because the group rebalanced.
- Consumer
Config - Configuration for the Kafka Consumer.
- Consumer
Handle - A
Clone + Send + Synchandle to a consumer that exposesConsumer::wakeupand the reentrant-safe consumer operations, callable from a task or thread other than the one owning the consumer. - Consumer
LogTruncation Error - Log truncation was detected: the broker’s log diverges from the offsets the consumer had fetched.
- Consumer
NoOffset ForPartition Error - No offset is defined for one or more partitions and no reset policy is set.
- Consumer
Offset OutOf Range Error - A fetch asked for an offset outside the range the broker retains.
- Consumer
Record - A key/value pair received from Kafka.
- Consumer
Record Options - Every parameter of Java’s widest
ConsumerRecordconstructor (ConsumerRecord.java:138). - Consumer
Record Options Builder - Fluent builder for
ConsumerRecordOptions. - Consumer
Records - A container that holds the list of
ConsumerRecordper partition for a particular topic. - Consumer
Retriable Commit Failed Error - An offset commit failed with a retriable error; committing the latest consumed offsets again may succeed.
- Kafka
Consumer - The public entry point for constructing a
Consumer. - Mock
Consumer - A mock of the
Consumerinterface, intended for testing code that uses Kafka. - Offset
AndMetadata - 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.
- Offset
AndTimestamp - A container class for offset and timestamp.
- Subscription
Pattern - Represents a regular expression compatible with Google RE2/J, used to subscribe to topics.
Enums§
- Group
Protocol - The group protocol that the consumer uses.
Traits§
- Consumer
- The single dispatch trait that
MockConsumer(Phase 3) andAsyncKafkaConsumer(Phase 11) both implement. Translates Java’sorg.apache.kafka.clients.consumer.Consumer<K, V>interface. - Consumer
Group Metadata - The consumer group information: group id, generation id, member id and group instance id.
- Consumer
Interceptor - 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.
- Consumer
Rebalance Listener - A callback interface that the user can implement to trigger custom actions when the set of partitions assigned to the consumer changes.
- Offset
Commit Callback - A callback interface that the user can implement to trigger custom actions when a commit request completes.