@InterfaceStability.Unstable
public interface Consumer<K,V>
extends java.io.Closeable
KafkaConsumer
,
MockConsumer
Modifier and Type | Method and Description |
---|---|
void |
assign(java.util.List<TopicPartition> partitions) |
java.util.Set<TopicPartition> |
assignment() |
void |
close() |
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<java.lang.String,java.util.List<PartitionInfo>> |
listTopics() |
java.util.Map<MetricName,? extends Metric> |
metrics() |
java.util.List<PartitionInfo> |
partitionsFor(java.lang.String topic) |
void |
pause(TopicPartition... partitions) |
ConsumerRecords<K,V> |
poll(long timeout) |
long |
position(TopicPartition partition) |
void |
resume(TopicPartition... partitions) |
void |
seek(TopicPartition partition,
long offset) |
void |
seekToBeginning(TopicPartition... partitions) |
void |
seekToEnd(TopicPartition... partitions) |
void |
subscribe(java.util.List<java.lang.String> topics) |
void |
subscribe(java.util.List<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.List<java.lang.String> topics)
KafkaConsumer.subscribe(List)
void subscribe(java.util.List<java.lang.String> topics, ConsumerRebalanceListener callback)
void assign(java.util.List<TopicPartition> partitions)
KafkaConsumer.assign(List)
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(TopicPartition... partitions)
void seekToEnd(TopicPartition... partitions)
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()
void pause(TopicPartition... partitions)
void resume(TopicPartition... partitions)
void close()
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
KafkaConsumer.close()
void wakeup()
KafkaConsumer.wakeup()