Interface Consumer<K,V>
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
KafkaConsumer
,MockConsumer
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
assign
(Collection<TopicPartition> partitions) beginningOffsets
(Collection<TopicPartition> partitions) beginningOffsets
(Collection<TopicPartition> partitions, Duration timeout) clientInstanceId
(Duration timeout) void
close()
void
void
void
commitAsync
(Map<TopicPartition, OffsetAndMetadata> offsets, OffsetCommitCallback callback) void
commitAsync
(OffsetCommitCallback callback) void
void
commitSync
(Duration timeout) void
commitSync
(Map<TopicPartition, OffsetAndMetadata> offsets) void
commitSync
(Map<TopicPartition, OffsetAndMetadata> offsets, Duration timeout) committed
(Set<TopicPartition> partitions) committed
(Set<TopicPartition> partitions, Duration timeout) committed
(TopicPartition partition) Deprecated.committed
(TopicPartition partition, Duration timeout) Deprecated.currentLag
(TopicPartition topicPartition) endOffsets
(Collection<TopicPartition> partitions) endOffsets
(Collection<TopicPartition> partitions, Duration timeout) void
void
enforceRebalance
(String reason) listTopics
(Duration timeout) Map<MetricName,
? extends Metric> metrics()
offsetsForTimes
(Map<TopicPartition, Long> timestampsToSearch) offsetsForTimes
(Map<TopicPartition, Long> timestampsToSearch, Duration timeout) partitionsFor
(String topic) partitionsFor
(String topic, Duration timeout) void
pause
(Collection<TopicPartition> partitions) paused()
poll
(long timeout) Deprecated.long
position
(TopicPartition partition) long
position
(TopicPartition partition, Duration timeout) void
resume
(Collection<TopicPartition> partitions) void
seek
(TopicPartition partition, long offset) void
seek
(TopicPartition partition, OffsetAndMetadata offsetAndMetadata) void
seekToBeginning
(Collection<TopicPartition> partitions) void
seekToEnd
(Collection<TopicPartition> partitions) void
subscribe
(Collection<String> topics) void
subscribe
(Collection<String> topics, ConsumerRebalanceListener callback) void
void
subscribe
(Pattern pattern, ConsumerRebalanceListener callback) void
void
wakeup()
-
Method Details
-
assignment
Set<TopicPartition> assignment()- See Also:
-
subscription
- See Also:
-
subscribe
- See Also:
-
subscribe
-
assign
- See Also:
-
subscribe
-
subscribe
- See Also:
-
unsubscribe
void unsubscribe()- See Also:
-
poll
Deprecated.- See Also:
-
poll
- See Also:
-
commitSync
void commitSync()- See Also:
-
commitSync
- See Also:
-
commitSync
- See Also:
-
commitSync
- See Also:
-
commitAsync
void commitAsync()- See Also:
-
commitAsync
-
commitAsync
-
seek
- See Also:
-
seek
-
seekToBeginning
-
seekToEnd
- See Also:
-
position
- See Also:
-
position
-
committed
Deprecated.- See Also:
-
committed
Deprecated. -
committed
- See Also:
-
committed
- See Also:
-
clientInstanceId
-
metrics
Map<MetricName,? extends Metric> metrics()- See Also:
-
partitionsFor
- See Also:
-
partitionsFor
-
listTopics
Map<String,List<PartitionInfo>> listTopics()- See Also:
-
listTopics
- See Also:
-
paused
Set<TopicPartition> paused()- See Also:
-
pause
- See Also:
-
resume
- See Also:
-
offsetsForTimes
- See Also:
-
offsetsForTimes
Map<TopicPartition,OffsetAndTimestamp> offsetsForTimes(Map<TopicPartition, Long> timestampsToSearch, Duration timeout) -
beginningOffsets
-
beginningOffsets
-
endOffsets
- See Also:
-
endOffsets
-
currentLag
- See Also:
-
groupMetadata
ConsumerGroupMetadata groupMetadata()- See Also:
-
enforceRebalance
void enforceRebalance()- See Also:
-
enforceRebalance
- See Also:
-
close
void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- See Also:
-
close
- See Also:
-
wakeup
void wakeup()- See Also:
-