public class KafkaReadStreamImpl<K,V> extends Object implements KafkaReadStream<K,V>
| Constructor and Description |
|---|
KafkaReadStreamImpl(Context context,
org.apache.kafka.clients.consumer.Consumer<K,V> consumer) |
| Modifier and Type | Method and Description |
|---|---|
KafkaReadStream<K,V> |
assign(Set<org.apache.kafka.common.TopicPartition> partitions)
Manually assign a set of partitions to this consumer.
|
KafkaReadStream<K,V> |
assign(Set<org.apache.kafka.common.TopicPartition> partitions,
Handler<AsyncResult<Void>> completionHandler)
Manually assign a set of partitions to this consumer.
|
KafkaReadStream<K,V> |
assignment(Handler<AsyncResult<Set<org.apache.kafka.common.TopicPartition>>> handler)
Get the set of partitions currently assigned to this consumer.
|
KafkaReadStream |
batchHandler(Handler<org.apache.kafka.clients.consumer.ConsumerRecords<K,V>> handler)
Set the handler that will be called when a new batch of records is
returned from Kafka.
|
void |
beginningOffsets(Set<org.apache.kafka.common.TopicPartition> topicPartitions,
Handler<AsyncResult<Map<org.apache.kafka.common.TopicPartition,Long>>> handler)
Get the first offset for the given partitions.
|
void |
beginningOffsets(org.apache.kafka.common.TopicPartition topicPartition,
Handler<AsyncResult<Long>> handler)
Get the first offset for the given partition.
|
void |
close(Handler<AsyncResult<Void>> completionHandler)
Close the stream
|
void |
commit()
Commit current offsets for all the subscribed list of topics and partition.
|
void |
commit(Handler<AsyncResult<Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata>>> completionHandler)
Commit current offsets for all the subscribed list of topics and partition.
|
void |
commit(Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata> offsets)
Commit the specified offsets for the specified list of topics and partitions to Kafka.
|
void |
commit(Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata> offsets,
Handler<AsyncResult<Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata>>> completionHandler)
Commit the specified offsets for the specified list of topics and partitions to Kafka.
|
void |
committed(org.apache.kafka.common.TopicPartition topicPartition,
Handler<AsyncResult<org.apache.kafka.clients.consumer.OffsetAndMetadata>> handler)
Get the last committed offset for the given partition (whether the commit happened by this process or another).
|
KafkaReadStreamImpl<K,V> |
endHandler(Handler<Void> endHandler)
Set an end handler.
|
void |
endOffsets(Set<org.apache.kafka.common.TopicPartition> topicPartitions,
Handler<AsyncResult<Map<org.apache.kafka.common.TopicPartition,Long>>> handler)
Get the last offset for the given partitions.
|
void |
endOffsets(org.apache.kafka.common.TopicPartition topicPartition,
Handler<AsyncResult<Long>> handler)
Get the last offset for the given partition.
|
KafkaReadStreamImpl<K,V> |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
KafkaReadStreamImpl<K,V> |
fetch(long amount)
Fetch the specified
amount of elements. |
KafkaReadStreamImpl<K,V> |
handler(Handler<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>> handler)
Set a data handler.
|
KafkaReadStream<K,V> |
listTopics(Handler<AsyncResult<Map<String,List<org.apache.kafka.common.PartitionInfo>>>> handler)
Get metadata about partitions for all topics that the user is authorized to view.
|
void |
offsetsForTimes(Map<org.apache.kafka.common.TopicPartition,Long> topicPartitionTimestamps,
Handler<AsyncResult<Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndTimestamp>>> handler)
Look up the offsets for the given partitions by timestamp.
|
void |
offsetsForTimes(org.apache.kafka.common.TopicPartition topicPartition,
long timestamp,
Handler<AsyncResult<org.apache.kafka.clients.consumer.OffsetAndTimestamp>> handler)
* Look up the offset for the given partition by timestamp.
|
KafkaReadStream<K,V> |
partitionsAssignedHandler(Handler<Set<org.apache.kafka.common.TopicPartition>> handler)
Set the handler called when topic partitions are assigned to the consumer
|
KafkaReadStreamImpl<K,V> |
partitionsFor(String topic,
Handler<AsyncResult<List<org.apache.kafka.common.PartitionInfo>>> handler)
Get metadata about the partitions for a given topic.
|
KafkaReadStream<K,V> |
partitionsRevokedHandler(Handler<Set<org.apache.kafka.common.TopicPartition>> handler)
Set the handler called when topic partitions are revoked to the consumer
|
KafkaReadStreamImpl<K,V> |
pause()
Pause the
ReadStream, it sets the buffer in fetch mode and clears the actual demand. |
KafkaReadStream<K,V> |
pause(Set<org.apache.kafka.common.TopicPartition> topicPartitions)
Suspend fetching from the requested partitions.
|
KafkaReadStream<K,V> |
pause(Set<org.apache.kafka.common.TopicPartition> topicPartitions,
Handler<AsyncResult<Void>> completionHandler)
Suspend fetching from the requested partitions.
|
void |
paused(Handler<AsyncResult<Set<org.apache.kafka.common.TopicPartition>>> handler)
Get the set of partitions that were previously paused by a call to
KafkaReadStream.pause(Set). |
void |
poll(long timeout,
Handler<AsyncResult<org.apache.kafka.clients.consumer.ConsumerRecords<K,V>>> handler)
Executes a poll for getting messages from Kafka
|
KafkaReadStream<K,V> |
pollTimeout(long timeout)
Sets the poll timeout (in ms) for the underlying native Kafka Consumer.
|
void |
position(org.apache.kafka.common.TopicPartition partition,
Handler<AsyncResult<Long>> handler)
Get the offset of the next record that will be fetched (if a record with that offset exists).
|
KafkaReadStreamImpl<K,V> |
resume()
Resume reading, and sets the buffer in
flowing mode. |
KafkaReadStream<K,V> |
resume(Set<org.apache.kafka.common.TopicPartition> topicPartitions)
Resume specified partitions which have been paused with pause.
|
KafkaReadStream<K,V> |
resume(Set<org.apache.kafka.common.TopicPartition> topicPartitions,
Handler<AsyncResult<Void>> completionHandler)
Resume specified partitions which have been paused with pause.
|
KafkaReadStream<K,V> |
seek(org.apache.kafka.common.TopicPartition topicPartition,
long offset)
Overrides the fetch offsets that the consumer will use on the next poll.
|
KafkaReadStream<K,V> |
seek(org.apache.kafka.common.TopicPartition topicPartition,
long offset,
Handler<AsyncResult<Void>> completionHandler)
Overrides the fetch offsets that the consumer will use on the next poll.
|
KafkaReadStream<K,V> |
seekToBeginning(Set<org.apache.kafka.common.TopicPartition> topicPartitions)
Seek to the first offset for each of the given partitions.
|
KafkaReadStream<K,V> |
seekToBeginning(Set<org.apache.kafka.common.TopicPartition> topicPartitions,
Handler<AsyncResult<Void>> completionHandler)
Seek to the first offset for each of the given partitions.
|
KafkaReadStream<K,V> |
seekToEnd(Set<org.apache.kafka.common.TopicPartition> topicPartitions)
Seek to the last offset for each of the given partitions.
|
KafkaReadStream<K,V> |
seekToEnd(Set<org.apache.kafka.common.TopicPartition> topicPartitions,
Handler<AsyncResult<Void>> completionHandler)
Seek to the last offset for each of the given partitions.
|
protected <T> void |
submitTask(BiConsumer<org.apache.kafka.clients.consumer.Consumer<K,V>,Promise<T>> task,
Handler<AsyncResult<T>> handler) |
KafkaReadStream<K,V> |
subscribe(Pattern pattern)
Subscribe to all topics matching specified pattern to get dynamically assigned partitions.
|
KafkaReadStream<K,V> |
subscribe(Pattern pattern,
Handler<AsyncResult<Void>> completionHandler)
Subscribe to all topics matching specified pattern to get dynamically assigned partitions.
|
KafkaReadStream<K,V> |
subscribe(Set<String> topics)
Subscribe to the given list of topics to get dynamically assigned partitions.
|
KafkaReadStream<K,V> |
subscribe(Set<String> topics,
Handler<AsyncResult<Void>> completionHandler)
Subscribe to the given list of topics to get dynamically assigned partitions.
|
KafkaReadStream<K,V> |
subscription(Handler<AsyncResult<Set<String>>> handler)
Get the current subscription.
|
KafkaReadStream<K,V> |
unsubscribe()
Unsubscribe from topics currently subscribed with subscribe.
|
KafkaReadStream<K,V> |
unsubscribe(Handler<AsyncResult<Void>> completionHandler)
Unsubscribe from topics currently subscribed with subscribe.
|
org.apache.kafka.clients.consumer.Consumer<K,V> |
unwrap() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, create, create, create, create, create, create, createpipe, pipeTo, pipeToprotected <T> void submitTask(BiConsumer<org.apache.kafka.clients.consumer.Consumer<K,V>,Promise<T>> task, Handler<AsyncResult<T>> handler)
public KafkaReadStream<K,V> pause(Set<org.apache.kafka.common.TopicPartition> topicPartitions)
KafkaReadStreampause in interface KafkaReadStream<K,V>topicPartitions - topic partition from which suspend fetchingpublic KafkaReadStream<K,V> pause(Set<org.apache.kafka.common.TopicPartition> topicPartitions, Handler<AsyncResult<Void>> completionHandler)
KafkaReadStream
Due to internal buffering of messages,
the record handler will
continue to observe messages from the given topicPartitions
until some time after the given completionHandler
is called. In contrast, the once the given completionHandler
is called the KafkaReadStream.batchHandler(Handler) will not see messages
from the given topicPartitions.
pause in interface KafkaReadStream<K,V>topicPartitions - topic partition from which suspend fetchingcompletionHandler - handler called on operation completedpublic void paused(Handler<AsyncResult<Set<org.apache.kafka.common.TopicPartition>>> handler)
KafkaReadStreamKafkaReadStream.pause(Set).paused in interface KafkaReadStream<K,V>handler - handler called on operation completedpublic KafkaReadStream<K,V> resume(Set<org.apache.kafka.common.TopicPartition> topicPartitions)
KafkaReadStreamresume in interface KafkaReadStream<K,V>topicPartitions - topic partition from which resume fetchingpublic KafkaReadStream<K,V> resume(Set<org.apache.kafka.common.TopicPartition> topicPartitions, Handler<AsyncResult<Void>> completionHandler)
KafkaReadStreamresume in interface KafkaReadStream<K,V>topicPartitions - topic partition from which resume fetchingcompletionHandler - handler called on operation completedpublic void committed(org.apache.kafka.common.TopicPartition topicPartition,
Handler<AsyncResult<org.apache.kafka.clients.consumer.OffsetAndMetadata>> handler)
KafkaReadStreamcommitted in interface KafkaReadStream<K,V>topicPartition - topic partition for getting last committed offsethandler - handler called on operation completedpublic KafkaReadStream<K,V> seekToEnd(Set<org.apache.kafka.common.TopicPartition> topicPartitions)
KafkaReadStreamseekToEnd in interface KafkaReadStream<K,V>topicPartitions - topic partition for which seekpublic KafkaReadStream<K,V> seekToEnd(Set<org.apache.kafka.common.TopicPartition> topicPartitions, Handler<AsyncResult<Void>> completionHandler)
KafkaReadStream
Due to internal buffering of messages,
the record handler will
continue to observe messages fetched with respect to the old offset
until some time after the given completionHandler
is called. In contrast, the once the given completionHandler
is called the KafkaReadStream.batchHandler(Handler) will only see messages
consistent with the new offset.
seekToEnd in interface KafkaReadStream<K,V>topicPartitions - topic partition for which seekcompletionHandler - handler called on operation completedpublic KafkaReadStream<K,V> seekToBeginning(Set<org.apache.kafka.common.TopicPartition> topicPartitions)
KafkaReadStreamseekToBeginning in interface KafkaReadStream<K,V>topicPartitions - topic partition for which seekpublic KafkaReadStream<K,V> seekToBeginning(Set<org.apache.kafka.common.TopicPartition> topicPartitions, Handler<AsyncResult<Void>> completionHandler)
KafkaReadStream
Due to internal buffering of messages,
the record handler will
continue to observe messages fetched with respect to the old offset
until some time after the given completionHandler
is called. In contrast, the once the given completionHandler
is called the KafkaReadStream.batchHandler(Handler) will only see messages
consistent with the new offset.
seekToBeginning in interface KafkaReadStream<K,V>topicPartitions - topic partition for which seekcompletionHandler - handler called on operation completedpublic KafkaReadStream<K,V> seek(org.apache.kafka.common.TopicPartition topicPartition, long offset)
KafkaReadStreamseek in interface KafkaReadStream<K,V>topicPartition - topic partition for which seekoffset - offset to seek inside the topic partitionpublic KafkaReadStream<K,V> seek(org.apache.kafka.common.TopicPartition topicPartition, long offset, Handler<AsyncResult<Void>> completionHandler)
KafkaReadStream
Due to internal buffering of messages,
the record handler will
continue to observe messages fetched with respect to the old offset
until some time after the given completionHandler
is called. In contrast, the once the given completionHandler
is called the KafkaReadStream.batchHandler(Handler) will only see messages
consistent with the new offset.
seek in interface KafkaReadStream<K,V>topicPartition - topic partition for which seekoffset - offset to seek inside the topic partitioncompletionHandler - handler called on operation completedpublic KafkaReadStream<K,V> partitionsRevokedHandler(Handler<Set<org.apache.kafka.common.TopicPartition>> handler)
KafkaReadStreampartitionsRevokedHandler in interface KafkaReadStream<K,V>handler - handler called on revoked topic partitionspublic KafkaReadStream<K,V> partitionsAssignedHandler(Handler<Set<org.apache.kafka.common.TopicPartition>> handler)
KafkaReadStreampartitionsAssignedHandler in interface KafkaReadStream<K,V>handler - handler called on assigned topic partitionspublic KafkaReadStream<K,V> subscribe(Set<String> topics)
KafkaReadStreamsubscribe in interface KafkaReadStream<K,V>topics - topics to subscribe topublic KafkaReadStream<K,V> subscribe(Set<String> topics, Handler<AsyncResult<Void>> completionHandler)
KafkaReadStream
Due to internal buffering of messages, when changing the subscribed topics
the old set of topics may remain in effect
(as observed by the KafkaReadStream.handler(Handler) record handler})
until some time after the given completionHandler
is called. In contrast, the once the given completionHandler
is called the KafkaReadStream.batchHandler(Handler) will only see messages
consistent with the new set of topics.
subscribe in interface KafkaReadStream<K,V>topics - topics to subscribe tocompletionHandler - handler called on operation completedpublic KafkaReadStream<K,V> subscribe(Pattern pattern, Handler<AsyncResult<Void>> completionHandler)
KafkaReadStream
Due to internal buffering of messages, when changing the subscribed topics
the old set of topics may remain in effect
(as observed by the KafkaReadStream.handler(Handler) record handler})
until some time after the given completionHandler
is called. In contrast, the once the given completionHandler
is called the KafkaReadStream.batchHandler(Handler) will only see messages
consistent with the new set of topics.
subscribe in interface KafkaReadStream<K,V>pattern - Pattern to subscribe tocompletionHandler - handler called on operation completedpublic KafkaReadStream<K,V> subscribe(Pattern pattern)
KafkaReadStreamsubscribe in interface KafkaReadStream<K,V>pattern - Pattern to subscribe topublic KafkaReadStream<K,V> unsubscribe()
KafkaReadStreamunsubscribe in interface KafkaReadStream<K,V>public KafkaReadStream<K,V> unsubscribe(Handler<AsyncResult<Void>> completionHandler)
KafkaReadStreamunsubscribe in interface KafkaReadStream<K,V>completionHandler - handler called on operation completedpublic KafkaReadStream<K,V> subscription(Handler<AsyncResult<Set<String>>> handler)
KafkaReadStreamsubscription in interface KafkaReadStream<K,V>handler - handler called on operation completedpublic KafkaReadStream<K,V> assign(Set<org.apache.kafka.common.TopicPartition> partitions)
KafkaReadStreamassign in interface KafkaReadStream<K,V>partitions - partitions which want assignedpublic KafkaReadStream<K,V> assign(Set<org.apache.kafka.common.TopicPartition> partitions, Handler<AsyncResult<Void>> completionHandler)
KafkaReadStream
Due to internal buffering of messages, when reassigning
the old set of partitions may remain in effect
(as observed by the KafkaReadStream.handler(Handler) record handler)}
until some time after the given completionHandler
is called. In contrast, the once the given completionHandler
is called the KafkaReadStream.batchHandler(Handler) will only see messages
consistent with the new set of partitions.
assign in interface KafkaReadStream<K,V>partitions - partitions which want assignedcompletionHandler - handler called on operation completedpublic KafkaReadStream<K,V> assignment(Handler<AsyncResult<Set<org.apache.kafka.common.TopicPartition>>> handler)
KafkaReadStreamassignment in interface KafkaReadStream<K,V>handler - handler called on operation completedpublic KafkaReadStream<K,V> listTopics(Handler<AsyncResult<Map<String,List<org.apache.kafka.common.PartitionInfo>>>> handler)
KafkaReadStreamlistTopics in interface KafkaReadStream<K,V>handler - handler called on operation completedpublic void commit()
KafkaReadStreamcommit in interface KafkaReadStream<K,V>public void commit(Handler<AsyncResult<Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata>>> completionHandler)
KafkaReadStreamcommit in interface KafkaReadStream<K,V>completionHandler - handler called on operation completedpublic void commit(Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata> offsets)
KafkaReadStreamcommit in interface KafkaReadStream<K,V>offsets - offsets list to commitpublic void commit(Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata> offsets, Handler<AsyncResult<Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata>>> completionHandler)
KafkaReadStreamcommit in interface KafkaReadStream<K,V>offsets - offsets list to commitcompletionHandler - handler called on operation completedpublic KafkaReadStreamImpl<K,V> partitionsFor(String topic, Handler<AsyncResult<List<org.apache.kafka.common.PartitionInfo>>> handler)
KafkaReadStreampartitionsFor in interface KafkaReadStream<K,V>topic - topic partition for which getting partitions infohandler - handler called on operation completedpublic KafkaReadStreamImpl<K,V> exceptionHandler(Handler<Throwable> handler)
ReadStreamexceptionHandler in interface ReadStream<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>exceptionHandler in interface StreamBaseexceptionHandler in interface KafkaReadStream<K,V>handler - the exception handlerpublic KafkaReadStreamImpl<K,V> handler(Handler<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>> handler)
ReadStreamhandler in interface ReadStream<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>handler in interface KafkaReadStream<K,V>public KafkaReadStreamImpl<K,V> pause()
ReadStreamReadStream, it sets the buffer in fetch mode and clears the actual demand.
While it's paused, no data will be sent to the data handler.
pause in interface ReadStream<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>pause in interface KafkaReadStream<K,V>public KafkaReadStreamImpl<K,V> resume()
ReadStreamflowing mode.
If the ReadStream has been paused, reading will recommence on it.resume in interface ReadStream<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>resume in interface KafkaReadStream<K,V>public KafkaReadStreamImpl<K,V> fetch(long amount)
ReadStreamamount of elements. If the ReadStream has been paused, reading will
recommence with the specified amount of items, otherwise the specified amount will
be added to the current stream demand.fetch in interface ReadStream<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>fetch in interface KafkaReadStream<K,V>public KafkaReadStreamImpl<K,V> endHandler(Handler<Void> endHandler)
ReadStreamendHandler in interface ReadStream<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>endHandler in interface KafkaReadStream<K,V>public void close(Handler<AsyncResult<Void>> completionHandler)
KafkaReadStreamclose in interface KafkaReadStream<K,V>completionHandler - handler called on operation completedpublic void position(org.apache.kafka.common.TopicPartition partition,
Handler<AsyncResult<Long>> handler)
KafkaReadStreamposition in interface KafkaReadStream<K,V>partition - The partition to get the position forhandler - handler called on operation completedpublic void offsetsForTimes(Map<org.apache.kafka.common.TopicPartition,Long> topicPartitionTimestamps, Handler<AsyncResult<Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndTimestamp>>> handler)
KafkaReadStreamoffsetsForTimes in interface KafkaReadStream<K,V>topicPartitionTimestamps - A map with pairs of (TopicPartition, Timestamp).handler - handler called on operation completedpublic void offsetsForTimes(org.apache.kafka.common.TopicPartition topicPartition,
long timestamp,
Handler<AsyncResult<org.apache.kafka.clients.consumer.OffsetAndTimestamp>> handler)
KafkaReadStreamoffsetsForTimes in interface KafkaReadStream<K,V>topicPartition - Partition to query.timestamp - Timestamp used to determine the offset.handler - handler called on operation completedpublic void beginningOffsets(Set<org.apache.kafka.common.TopicPartition> topicPartitions, Handler<AsyncResult<Map<org.apache.kafka.common.TopicPartition,Long>>> handler)
KafkaReadStreambeginningOffsets in interface KafkaReadStream<K,V>topicPartitions - the partitions to get the earliest offsets.handler - handler called on operation completed. Returns the earliest available offsets for the given partitionspublic void beginningOffsets(org.apache.kafka.common.TopicPartition topicPartition,
Handler<AsyncResult<Long>> handler)
KafkaReadStreambeginningOffsets in interface KafkaReadStream<K,V>topicPartition - the partition to get the earliest offset.handler - handler called on operation completed. Returns the earliest available offset for the given partitionpublic void endOffsets(Set<org.apache.kafka.common.TopicPartition> topicPartitions, Handler<AsyncResult<Map<org.apache.kafka.common.TopicPartition,Long>>> handler)
KafkaReadStreamendOffsets in interface KafkaReadStream<K,V>topicPartitions - the partitions to get the end offsets.handler - handler called on operation completed. The end offsets for the given partitions.public void endOffsets(org.apache.kafka.common.TopicPartition topicPartition,
Handler<AsyncResult<Long>> handler)
KafkaReadStreamendOffsets in interface KafkaReadStream<K,V>topicPartition - the partition to get the end offset.handler - handler called on operation completed. The end offset for the given partition.public org.apache.kafka.clients.consumer.Consumer<K,V> unwrap()
unwrap in interface KafkaReadStream<K,V>public KafkaReadStream batchHandler(Handler<org.apache.kafka.clients.consumer.ConsumerRecords<K,V>> handler)
KafkaReadStreamrecord handler.batchHandler in interface KafkaReadStream<K,V>handler - handler called each time Kafka returns a batch of records.public KafkaReadStream<K,V> pollTimeout(long timeout)
KafkaReadStreampollTimeout in interface KafkaReadStream<K,V>timeout - The time, in milliseconds, spent waiting in poll if data is not available in the buffer.
If 0, returns immediately with any records that are available currently in the native Kafka consumer's buffer,
else returns empty. Must not be negative.public void poll(long timeout,
Handler<AsyncResult<org.apache.kafka.clients.consumer.ConsumerRecords<K,V>>> handler)
KafkaReadStreampoll in interface KafkaReadStream<K,V>timeout - The time, in milliseconds, spent waiting in poll if data is not available in the buffer.
If 0, returns immediately with any records that are available currently in the native Kafka consumer's buffer,
else returns empty. Must not be negative.handler - handler called after the poll with batch of records (can be empty).Copyright © 2020. All rights reserved.