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) |
void |
close() |
void |
close(long timeout,
java.util.concurrent.TimeUnit unit) |
void |
commitAsync() |
void |
commitAsync(java.util.Map<TopicPartition,OffsetAndMetadata> offsets,
OffsetCommitCallback callback) |
void |
commitAsync(OffsetCommitCallback callback) |
void |
commitSync() |
void |
commitSync(java.util.Map<TopicPartition,OffsetAndMetadata> offsets) |
OffsetAndMetadata |
committed(TopicPartition partition) |
java.util.Map<TopicPartition,java.lang.Long> |
endOffsets(java.util.Collection<TopicPartition> partitions) |
java.util.Map<java.lang.String,java.util.List<PartitionInfo>> |
listTopics() |
java.util.Map<MetricName,? extends Metric> |
metrics() |
java.util.Map<TopicPartition,OffsetAndTimestamp> |
offsetsForTimes(java.util.Map<TopicPartition,java.lang.Long> timestampsToSearch) |
java.util.List<PartitionInfo> |
partitionsFor(java.lang.String topic) |
void |
pause(java.util.Collection<TopicPartition> partitions) |
java.util.Set<TopicPartition> |
paused() |
ConsumerRecords<K,V> |
poll(long timeout) |
long |
position(TopicPartition partition) |
void |
resume(java.util.Collection<TopicPartition> partitions) |
void |
seek(TopicPartition partition,
long offset) |
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,
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 unsubscribe()
KafkaConsumer.unsubscribe()
ConsumerRecords<K,V> poll(long timeout)
KafkaConsumer.poll(long)
void commitSync()
KafkaConsumer.commitSync()
void commitSync(java.util.Map<TopicPartition,OffsetAndMetadata> offsets)
KafkaConsumer.commitSync(Map)
void commitAsync()
KafkaConsumer.commitAsync()
void commitAsync(OffsetCommitCallback callback)
void commitAsync(java.util.Map<TopicPartition,OffsetAndMetadata> offsets, OffsetCommitCallback callback)
void seek(TopicPartition partition, long offset)
void seekToBeginning(java.util.Collection<TopicPartition> partitions)
void seekToEnd(java.util.Collection<TopicPartition> partitions)
KafkaConsumer.seekToEnd(Collection)
long position(TopicPartition partition)
OffsetAndMetadata committed(TopicPartition partition)
java.util.Map<MetricName,? extends Metric> metrics()
KafkaConsumer.metrics()
java.util.List<PartitionInfo> partitionsFor(java.lang.String topic)
KafkaConsumer.partitionsFor(String)
java.util.Map<java.lang.String,java.util.List<PartitionInfo>> listTopics()
KafkaConsumer.listTopics()
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)
java.util.Map<TopicPartition,java.lang.Long> beginningOffsets(java.util.Collection<TopicPartition> partitions)
java.util.Map<TopicPartition,java.lang.Long> endOffsets(java.util.Collection<TopicPartition> partitions)
void close()
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
KafkaConsumer.close()
void close(long timeout, java.util.concurrent.TimeUnit unit)
KafkaConsumer.close(long, TimeUnit)
void wakeup()
KafkaConsumer.wakeup()