作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是 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
最佳答案
I am new to kafka and trying to understand if there is a way to read messages from last consumed offset, but not from beginning.
[root@sandbox bin]# ./kafka-console-consumer.sh --topic test1 --zookeeper localhost:2181 --consumer.config /home/mrnakumar/consumer.properties
group.id=consoleGroup
关于apache-kafka - 如何让 kafka 消费者从上次消费的偏移量而不是从头开始读取,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33676266/
我是一名优秀的程序员,十分优秀!