消费者常用API
消费者接口:org.apache.kafka.clients.consumer.Consumer官网文档:All Classes (kafka 2.1.0 API)常用API1.publicvoidseek(TopicPartitionpartition, longoffset)Overrides the fetch offsets that the consumer will use on th
·
消费者接口:org.apache.kafka.clients.consumer.Consumer
官网文档:All Classes (kafka 2.1.0 API)
常用API
1. public void seek(TopicPartition partition, long offset)
Overrides the fetch offsets that the consumer will use on the next poll(timeout). If this API is invoked for the same partition more than once, the latest offset will be used on the next poll(). Note that you may lose data if this API is arbitrarily used in the middle of consumption, to reset the fetch offsets
更多推荐
已为社区贡献2条内容
所有评论(0)