How to read data using Kafka Consumer API from beginning?

前端 未结 10 2036
清歌不尽
清歌不尽 2020-12-05 02:06

Please can anyone tell me how to read messages using the Kafka Consumer API from the beginning every time when I run the consumer.

10条回答
  •  一生所求
    2020-12-05 02:34

    1) https://stackoverflow.com/a/17084401/3821653

    2) http://mail-archives.apache.org/mod_mbox/kafka-users/201403.mbox/%3CCAOG_4QYz2ynH45a8kXb8qw7xw4vDRRwNqMn5j9ERFxJ8RfKGCg@mail.gmail.com%3E

    To reset the consumer group, you can delete the Zookeeper group id

     import kafka.utils.ZkUtils;
     ZkUtils.maybeDeletePath(, );`
    

提交回复
热议问题