Manually assign a partition to this consumer.
Due to internal buffering of messages, when reassigning
the old partition may remain in effect
(as observed by the record handler)}
until some time after the given completionHandler
is called. In contrast, the once the given completionHandler
is called the {@link KafkaConsumer#batchHandler} will only see messages
consistent with the new partition.
Manually assign a partition to this consumer.
Due to internal buffering of messages, when reassigning
the old partition may remain in effect
(as observed by the record handler)}
until some time after the given completionHandler
is called. In contrast, the once the given completionHandler
is called the {@link KafkaConsumer#batchHandler} will only see messages
consistent with the new partition.
Manually assign a list of partition to this consumer.
Due to internal buffering of messages, when reassigning
the old set of partitions may remain in effect
(as observed by the record handler)}
until some time after the given completionHandler
is called. In contrast, the once the given completionHandler
is called the {@link KafkaConsumer#batchHandler} will only see messages
consistent with the new set of partitions.
Manually assign a list of partition to this consumer.
Due to internal buffering of messages, when reassigning
the old set of partitions may remain in effect
(as observed by the record handler)}
until some time after the given completionHandler
is called. In contrast, the once the given completionHandler
is called the {@link KafkaConsumer#batchHandler} will only see messages
consistent with the new set of partitions.
Get the set of partitions currently assigned to this consumer.
Get the set of partitions currently assigned to this consumer.
Set the handler to be used when batches of messages are fetched from the Kafka server. Batch handlers need to take care not to block the event loop when dealing with large batches. It is better to process records individually using the [#handler(Handler) record handler] KafkaConsumer.
Get the first offset for the given partitions.
Get the first offset for the given partitions.
Close the consumer
Close the consumer
Commit current offsets for all the subscribed list of topics and partition.
Commit current offsets for all the subscribed list of topics and partition.
Get the last committed offset for the given partition (whether the commit happened by this process or another).
Get the last committed offset for the given partition (whether the commit happened by this process or another).
Returns the current demand.
Get the last offset for the given partition. The last offset of a partition is the offset of the upcoming message, i.e. the offset of the last available message + 1.
Get the last offset for the given partition. The last offset of a partition is the offset of the upcoming message, i.e. the offset of the last available message + 1.
Look up the offset for the given partition by timestamp. Note: the result might be null in case for the given timestamp no offset can be found -- e.g., when the timestamp refers to the future
Look up the offset for the given partition by timestamp. Note: the result might be null in case for the given timestamp no offset can be found -- e.g., when the timestamp refers to the future
Set the handler called when topic partitions are assigned to the consumer
Get metadata about the partitions for a given topic.
Get metadata about the partitions for a given topic.
Set the handler called when topic partitions are revoked to the consumer
Suspend fetching from the requested partition.
Due to internal buffering of messages,
the will
continue to observe messages from the given topicPartition
until some time after the given completionHandler
is called. In contrast, the once the given completionHandler
is called the {@link KafkaConsumer#batchHandler} will not see messages
from the given topicPartition
.
Suspend fetching from the requested partition.
Due to internal buffering of messages,
the will
continue to observe messages from the given topicPartition
until some time after the given completionHandler
is called. In contrast, the once the given completionHandler
is called the {@link KafkaConsumer#batchHandler} will not see messages
from the given topicPartition
.
Suspend fetching from the requested partitions.
Due to internal buffering of messages,
the 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 {@link KafkaConsumer#batchHandler} will not see messages
from the given topicPartitions
.
Suspend fetching from the requested partitions.
Due to internal buffering of messages,
the 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 {@link KafkaConsumer#batchHandler} will not see messages
from the given topicPartitions
.
Get the set of partitions that were previously paused by a call to pause(Set).
Get the set of partitions that were previously paused by a call to pause(Set).
Executes a poll for getting messages from Kafka.
Executes a poll for getting messages from Kafka.
Sets the poll timeout for the underlying native Kafka Consumer. Defaults to 1000ms. Setting timeout to a lower value results in a more 'responsive' client, because it will block for a shorter period if no data is available in the assigned partition and therefore allows subsequent actions to be executed with a shorter delay. At the same time, the client will poll more frequently and thus will potentially create a higher load on the Kafka Broker.
Get the offset of the next record that will be fetched (if a record with that offset exists).
Get the offset of the next record that will be fetched (if a record with that offset exists).
Resume specified partition which have been paused with pause.
Resume specified partition which have been paused with pause.
Resume specified partitions which have been paused with pause.
Resume specified partitions which have been paused with pause.
Overrides the fetch offsets that the consumer will use on the next poll.
Due to internal buffering of messages,
the 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 {@link KafkaConsumer#batchHandler} will only see messages
consistent with the new offset.
Overrides the fetch offsets that the consumer will use on the next poll.
Due to internal buffering of messages,
the 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 {@link KafkaConsumer#batchHandler} will only see messages
consistent with the new offset.
Seek to the first offset for each of the given partition.
Due to internal buffering of messages,
the 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 {@link KafkaConsumer#batchHandler} will only see messages
consistent with the new offset.
Seek to the first offset for each of the given partition.
Due to internal buffering of messages,
the 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 {@link KafkaConsumer#batchHandler} will only see messages
consistent with the new offset.
Seek to the first offset for each of the given partitions.
Due to internal buffering of messages,
the 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 {@link KafkaConsumer#batchHandler} will only see messages
consistent with the new offset.
Seek to the first offset for each of the given partitions.
Due to internal buffering of messages,
the 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 {@link KafkaConsumer#batchHandler} will only see messages
consistent with the new offset.
Seek to the last offset for each of the given partition.
Due to internal buffering of messages,
the 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 {@link KafkaConsumer#batchHandler} will only see messages
consistent with the new offset.
Seek to the last offset for each of the given partition.
Due to internal buffering of messages,
the 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 {@link KafkaConsumer#batchHandler} will only see messages
consistent with the new offset.
Seek to the last offset for each of the given partitions.
Due to internal buffering of messages,
the 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 {@link KafkaConsumer#batchHandler} will only see messages
consistent with the new offset.
Seek to the last offset for each of the given partitions.
Due to internal buffering of messages,
the 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 {@link KafkaConsumer#batchHandler} will only see messages
consistent with the new offset.
Subscribe to the given topic to get dynamically assigned partitions.
Due to internal buffering of messages, when changing the subscribed topic
the old topic may remain in effect
(as observed by the record handler})
until some time after the given completionHandler
is called. In contrast, the once the given completionHandler
is called the {@link KafkaConsumer#batchHandler} will only see messages
consistent with the new topic.
Subscribe to the given topic to get dynamically assigned partitions.
Due to internal buffering of messages, when changing the subscribed topic
the old topic may remain in effect
(as observed by the record handler})
until some time after the given completionHandler
is called. In contrast, the once the given completionHandler
is called the {@link KafkaConsumer#batchHandler} will only see messages
consistent with the new topic.
Subscribe to the given list of topics to get dynamically assigned partitions.
Due to internal buffering of messages, when changing the subscribed topics
the old set of topics may remain in effect
(as observed by the record handler})
until some time after the given completionHandler
is called. In contrast, the once the given completionHandler
is called the {@link KafkaConsumer#batchHandler} will only see messages
consistent with the new set of topics.
Subscribe to the given list of topics to get dynamically assigned partitions.
Due to internal buffering of messages, when changing the subscribed topics
the old set of topics may remain in effect
(as observed by the record handler})
until some time after the given completionHandler
is called. In contrast, the once the given completionHandler
is called the {@link KafkaConsumer#batchHandler} will only see messages
consistent with the new set of topics.
Get the current subscription.
Get the current subscription.
Unsubscribe from topics currently subscribed with subscribe.
Unsubscribe from topics currently subscribed with subscribe.
Create a new KafkaConsumer instance
Create a new KafkaConsumer instance
Create a new KafkaConsumer instance
Create a new KafkaConsumer instance
Generated using TypeDoc
Vert.x Kafka consumer.
You receive Kafka records by providing a {@link KafkaConsumer#handler}. As messages arrive the handler will be called with the records.
The {@link KafkaConsumer#pause} and {@link KafkaConsumer#resume} provides global control over reading the records from the consumer.
The {@link KafkaConsumer#pause} and {@link KafkaConsumer#resume} provides finer grained control over reading records for specific Topic/Partition, these are Kafka's specific operations.