public static interface KafkaConsumer.Preparer
Modifier and Type | Method and Description |
---|---|
KafkaConsumer.Preparer |
add(String topic,
int partition,
long offset)
Consumes messages from a given offset.
|
KafkaConsumer.Preparer |
addFromBeginning(String topic,
int partition)
Consumes messages from the earliest message available.
|
KafkaConsumer.Preparer |
addLatest(String topic,
int partition)
Consumes messages from the latest message.
|
Cancellable |
consume(KafkaConsumer.MessageCallback callback)
Starts the consumption as being configured by this
KafkaConsumer.Preparer . |
KafkaConsumer.Preparer add(String topic, int partition, long offset)
topic
- Topic to consume from.partition
- Partition in the topic to consume from.offset
- Offset to starts with.KafkaConsumer.Preparer
instance.KafkaConsumer.Preparer addFromBeginning(String topic, int partition)
topic
- Topic to consume from.partition
- Partition in the topic to consume from.KafkaConsumer.Preparer
instance.KafkaConsumer.Preparer addLatest(String topic, int partition)
topic
- Topic to consume from.partition
- Partition in the topic to consume from.KafkaConsumer.Preparer
instance.Cancellable consume(KafkaConsumer.MessageCallback callback)
KafkaConsumer.Preparer
.callback
- The KafkaConsumer.MessageCallback
for receiving new messages.Cancellable
for cancelling message consumption.Copyright © 2013-2016 The Apache Software Foundation. All rights reserved.