Interface Summary Interface Description Consumer<K,V> ConsumerInterceptor<K,V>A plugin interface that allows you to intercept (and possibly mutate) records received by the consumer. ConsumerPartitionAssignorThis interface is used to define custom partition assignment for use in
ConsumerRebalanceListenerA callback interface that the user can implement to trigger custom actions when the set of partitions assigned to the consumer changes. OffsetCommitCallbackA callback interface that the user can implement to trigger custom actions when a commit request completes.
Class Summary Class Description ConsumerConfigThe consumer configuration keys ConsumerGroupMetadataA metadata struct containing the consumer group information. ConsumerPartitionAssignor.Assignment ConsumerPartitionAssignor.GroupAssignment ConsumerPartitionAssignor.GroupSubscription ConsumerPartitionAssignor.Subscription ConsumerRecord<K,V>A key/value pair to be received from Kafka. ConsumerRecords<K,V>A container that holds the list
ConsumerRecordper partition for a particular topic.
CooperativeStickyAssignorA cooperative version of the
KafkaConsumer<K,V>A client that consumes records from a Kafka cluster. MockConsumer<K,V>A mock of the
Consumerinterface you can use for testing code that uses Kafka.
OffsetAndMetadataThe Kafka offset commit API allows users to provide additional metadata (in the form of a string) when an offset is committed. OffsetAndTimestampA container class for offset and timestamp. RangeAssignorThe range assignor works on a per-topic basis. RoundRobinAssignorThe round robin assignor lays out all the available partitions and all the available consumers. StickyAssignorThe sticky assignor serves two purposes.
Enum Summary Enum Description ConsumerPartitionAssignor.RebalanceProtocolThe rebalance protocol defines partition assignment and revocation semantics. OffsetResetStrategy
Exception Summary Exception Description CommitFailedExceptionThis exception is raised when an offset commit with
KafkaConsumer.commitSync()fails with an unrecoverable error.
InvalidOffsetExceptionThrown when the offset for a set of partitions is invalid (either undefined or out of range), and no reset policy has been configured. LogTruncationExceptionIn the event of an unclean leader election, the log will be truncated, previously committed data will be lost, and new data will be written over these offsets. NoOffsetForPartitionExceptionIndicates that there is no stored offset for a partition and no defined offset reset policy. OffsetOutOfRangeExceptionNo reset policy has been defined, and the offsets for these partitions are either larger or smaller than the range of offsets the server has for the given partition. RetriableCommitFailedException