Kafka 自动提交间隔最佳实践

Kafka auto commit interval best practice

选择 auto.commit.interval.ms 的值时是否有任何最佳实践?

我读 here 是:

In general, it is not recommended to keep this interval too small because it vastly increases the read/write rates in zookeeper and zookeeper gets slowed down because it's strongly consistent across its quorum.

什么太小了?这仍然是 kafka >= 0.9.0 版本的问题吗?

问题不是什么是小,而是你能接受什么?如果您可以忍受在消费者崩溃的情况下重新处理几分钟的消息,则可以将间隔设置为几分钟。因为这就是它的全部内容:消息将在(重新)从最后提交的偏移量开始后处理。