org.apache.kafka.common.errors.ApiException: 会话超时不在可接受的范围内

org.apache.kafka.common.errors.ApiException: The session timeout is not within an acceptable range

我在使用 kafka 0.9.0 的消费者中遇到上述异常。1.According 到此线程[1] 我没有在 [=21= 中看到 "group.max.session.timeout.ms" 属性 ] 文件。

org.apache.kafka.common.errors.ApiException: The session timeout is not within an acceptable range

有线索吗?

[1]http://comments.gmane.org/gmane.comp.apache.kafka.user/12426

kafka中有一个server-side配置限制最大超时值:

group.max.session.timeout.ms

不设置默认为30000ms

这位于“/config/server.properties”中。

将它设置为比您的消费者超时更高的值,您会没事的。