【发布时间】:2016-02-14 01:29:24
【问题描述】:
我是 kafka 的新手,并试图了解是否有办法从上次使用的偏移量读取消息,但不是从头开始。
我正在写一个例子,这样我的意图就不会偏离。
Eg:
1) I produced 5 messages at 7:00 PM and console consumer consumed those.
2) I stopped consumer at 7:10 PM
3) I produced 10 message at 7:20 PM. No consumer had read those messages.
4) Now, i have started console consumer at 7:30 PM, without from-beginning.
5) Now, it Will read the messages produced after it has started. Not the earlier ones, which were produced at 7.20 PM
有没有办法从上次消费的偏移量中获取消息。?
【问题讨论】:
标签: apache-kafka kafka-consumer-api