Kafka-提交偏移量(offset)

1.自动提交:
  1.属性enable.auto.commit -> true
  2.属性auto.commit.interval.ms ->5000 默认提交时间间隔为5s
  3.消费者会自动将poll()方法接收到的消息的最大偏移量提交上去
2.手动提交偏移量(分为两种)
  1.同步的提交
  2,异步的提交
3.同步方式提交偏移量

4.异步方式提交偏移量

猜你喜欢

转载自blog.csdn.net/weixin_41227335/article/details/86522041