6 月 052017
 

参考url:https://www.elastic.co/guide/en/logstash/2.3/plugins-inputs-kafka.html

其实文档里面写的很清楚了设置 reset_beginning 为true 就可以重新读取队列,但是我测试下来都不行,后来发现官方文档写的很清楚:This is destructive! Must be used in conjunction with auto_offset_reset ⇒ smallest

才发现中文文档都少这个配置,我把auto_offset_reset ⇒ smallest 之后发现,果然队列全部从头开始读,如果不设的话,日志会从上次消费的读取。如果reset_beginning 设为false的话,直接只读取最近的日志。以后再找个时间测试下。

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny