public interface Consumer<K,V>
extends java.io.Closeable
KafkaConsumer
,
MockConsumer
Modifier and Type | Method and Description |
---|---|
void |
assign(java.util.Collection<TopicPartition> partitions) |
java.util.Set<TopicPartition> |
assignment() |
java.util.Map<TopicPartition,java.lang.Long> |
beginningOffsets(java.util.Collection<TopicPartition> partitions) |
java.util.Map<TopicPartition,java.lang.Long> |
beginningOffsets(java.util.Collection<TopicPartition> partitions,
java.time.Duration timeout) |
void |
close() |
void |
close(java.time.Duration timeout) |
void |
close(long timeout,
java.util.concurrent.TimeUnit unit)
Deprecated.
|
void |
commitAsync() |
void |
commitAsync(java.util.Map<TopicPartition,OffsetAndMetadata> offsets,
OffsetCommitCallback callback) |
void |
commitAsync(OffsetCommitCallback callback) |
void |
commitSync() |
void |
commitSync(java.time.Duration timeout) |
void |
commitSync(java.util.Map<TopicPartition,OffsetAndMetadata> offsets) |
void |
commitSync(java.util.Map<TopicPartition,OffsetAndMetadata> offsets,
java.time.Duration timeout) |
java.util.Map<TopicPartition,OffsetAndMetadata> |
committed(java.util.Set<TopicPartition> partitions) |
java.util.Map<TopicPartition,OffsetAndMetadata> |
committed(java.util.Set<TopicPartition> partitions,
java.time.Duration timeout) |
OffsetAndMetadata |
committed(TopicPartition partition)
Deprecated.
|
OffsetAndMetadata |
committed(TopicPartition partition,
java.time.Duration timeout)
Deprecated.
|
java.util.Map<TopicPartition,java.lang.Long> |
endOffsets(java.util.Collection<TopicPartition> partitions) |
java.util.Map<TopicPartition,java.lang.Long> |
endOffsets(java.util.Collection<TopicPartition> partitions,
java.time.Duration timeout) |
void |
enforceRebalance() |
ConsumerGroupMetadata |
groupMetadata() |
java.util.Map<java.lang.String,java.util.List<PartitionInfo>> |
listTopics() |
java.util.Map<java.lang.String,java.util.List<PartitionInfo>> |
listTopics(java.time.Duration timeout) |
java.util.Map<MetricName,? extends Metric> |
metrics() |
java.util.Map<TopicPartition,OffsetAndTimestamp> |
offsetsForTimes(java.util.Map<TopicPartition,java.lang.Long> timestampsToSearch) |
java.util.Map<TopicPartition,OffsetAndTimestamp> |
offsetsForTimes(java.util.Map<TopicPartition,java.lang.Long> timestampsToSearch,
java.time.Duration timeout) |
java.util.List<PartitionInfo> |
partitionsFor(java.lang.String topic) |
java.util.List<PartitionInfo> |
partitionsFor(java.lang.String topic,
java.time.Duration timeout) |
void |
pause(java.util.Collection<TopicPartition> partitions) |
java.util.Set<TopicPartition> |
paused() |
ConsumerRecords<K,V> |
poll(java.time.Duration timeout) |
ConsumerRecords<K,V> |
poll(long timeout)
Deprecated.
|
long |
position(TopicPartition partition) |
long |
position(TopicPartition partition,
java.time.Duration timeout) |
void |
resume(java.util.Collection<TopicPartition> partitions) |
void |
seek(TopicPartition partition,
long offset) |
void |
seek(TopicPartition partition,
OffsetAndMetadata offsetAndMetadata) |
void |
seekToBeginning(java.util.Collection<TopicPartition> partitions) |
void |
seekToEnd(java.util.Collection<TopicPartition> partitions) |
void |
subscribe(java.util.Collection<java.lang.String> topics) |
void |
subscribe(java.util.Collection<java.lang.String> topics,
ConsumerRebalanceListener callback) |
void |
subscribe(java.util.regex.Pattern pattern) |
void |
subscribe(java.util.regex.Pattern pattern,
ConsumerRebalanceListener callback) |
java.util.Set<java.lang.String> |
subscription() |
void |
unsubscribe() |
void |
wakeup() |
java.util.Set<TopicPartition> assignment()
KafkaConsumer.assignment()
java.util.Set<java.lang.String> subscription()
KafkaConsumer.subscription()
void subscribe(java.util.Collection<java.lang.String> topics)
KafkaConsumer.subscribe(Collection)
void subscribe(java.util.Collection<java.lang.String> topics, ConsumerRebalanceListener callback)
void assign(java.util.Collection<TopicPartition> partitions)
KafkaConsumer.assign(Collection)
void subscribe(java.util.regex.Pattern pattern, ConsumerRebalanceListener callback)
void subscribe(java.util.regex.Pattern pattern)
KafkaConsumer.subscribe(Pattern)
void unsubscribe()
KafkaConsumer.unsubscribe()
@Deprecated ConsumerRecords<K,V> poll(long timeout)
KafkaConsumer.poll(long)
ConsumerRecords<K,V> poll(java.time.Duration timeout)
KafkaConsumer.poll(Duration)
void commitSync()
KafkaConsumer.commitSync()
void commitSync(java.time.Duration timeout)
KafkaConsumer.commitSync(Duration)
void commitSync(java.util.Map<TopicPartition,OffsetAndMetadata> offsets)
KafkaConsumer.commitSync(Map)
void commitSync(java.util.Map<TopicPartition,OffsetAndMetadata> offsets, java.time.Duration timeout)
KafkaConsumer.commitSync(Map, Duration)
void commitAsync()
KafkaConsumer.commitAsync()
void commitAsync(OffsetCommitCallback callback)
void commitAsync(java.util.Map<TopicPartition,OffsetAndMetadata> offsets, OffsetCommitCallback callback)
void seek(TopicPartition partition, long offset)
KafkaConsumer.seek(TopicPartition, long)
void seek(TopicPartition partition, OffsetAndMetadata offsetAndMetadata)
void seekToBeginning(java.util.Collection<TopicPartition> partitions)
void seekToEnd(java.util.Collection<TopicPartition> partitions)
KafkaConsumer.seekToEnd(Collection)
long position(TopicPartition partition)
KafkaConsumer.position(TopicPartition)
long position(TopicPartition partition, java.time.Duration timeout)
@Deprecated OffsetAndMetadata committed(TopicPartition partition)
KafkaConsumer.committed(TopicPartition)
@Deprecated OffsetAndMetadata committed(TopicPartition partition, java.time.Duration timeout)
java.util.Map<TopicPartition,OffsetAndMetadata> committed(java.util.Set<TopicPartition> partitions)
KafkaConsumer.committed(Set)
java.util.Map<TopicPartition,OffsetAndMetadata> committed(java.util.Set<TopicPartition> partitions, java.time.Duration timeout)
KafkaConsumer.committed(Set, Duration)
java.util.Map<MetricName,? extends Metric> metrics()
KafkaConsumer.metrics()
java.util.List<PartitionInfo> partitionsFor(java.lang.String topic)
KafkaConsumer.partitionsFor(String)
java.util.List<PartitionInfo> partitionsFor(java.lang.String topic, java.time.Duration timeout)
java.util.Map<java.lang.String,java.util.List<PartitionInfo>> listTopics()
KafkaConsumer.listTopics()
java.util.Map<java.lang.String,java.util.List<PartitionInfo>> listTopics(java.time.Duration timeout)
KafkaConsumer.listTopics(Duration)
java.util.Set<TopicPartition> paused()
KafkaConsumer.paused()
void pause(java.util.Collection<TopicPartition> partitions)
KafkaConsumer.pause(Collection)
void resume(java.util.Collection<TopicPartition> partitions)
KafkaConsumer.resume(Collection)
java.util.Map<TopicPartition,OffsetAndTimestamp> offsetsForTimes(java.util.Map<TopicPartition,java.lang.Long> timestampsToSearch)
KafkaConsumer.offsetsForTimes(Map)
java.util.Map<TopicPartition,OffsetAndTimestamp> offsetsForTimes(java.util.Map<TopicPartition,java.lang.Long> timestampsToSearch, java.time.Duration timeout)
java.util.Map<TopicPartition,java.lang.Long> beginningOffsets(java.util.Collection<TopicPartition> partitions)
java.util.Map<TopicPartition,java.lang.Long> beginningOffsets(java.util.Collection<TopicPartition> partitions, java.time.Duration timeout)
java.util.Map<TopicPartition,java.lang.Long> endOffsets(java.util.Collection<TopicPartition> partitions)
KafkaConsumer.endOffsets(Collection)
java.util.Map<TopicPartition,java.lang.Long> endOffsets(java.util.Collection<TopicPartition> partitions, java.time.Duration timeout)
ConsumerGroupMetadata groupMetadata()
KafkaConsumer.groupMetadata()
void enforceRebalance()
KafkaConsumer.enforceRebalance()
void close()
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
KafkaConsumer.close()
@Deprecated void close(long timeout, java.util.concurrent.TimeUnit unit)
KafkaConsumer.close(long, TimeUnit)
void close(java.time.Duration timeout)
KafkaConsumer.close(Duration)
void wakeup()
KafkaConsumer.wakeup()