【发布时间】:2019-02-26 06:18:27
【问题描述】:
以下内容来自 Kafka 2.1 文档。
https://kafka.apache.org/documentation/
Offset expiration semantics has slightly changed in this version.
According to the new semantics, offsets of partitions in a group will
not be removed while the group is subscribed to the corresponding
topic and is still active (has active consumers). If group becomes
empty all its offsets will be removed after default offset retention
period (or the one set by broker) has passed (unless the group becomes
active again). Offsets associated with standalone (simple) consumers,
that do not use Kafka group management, will be removed after default
offset retention period (or the one set by broker) has passed since
their last commit.
如果我理解正确的话,只要连接了 Stream Thread 消费者,没有保留设置将生效?
流应用重启后我也开始观察到以下异常
流线程 - 恢复流任务失败。删除 StreamTasks 存储以从头开始重新创建。 org.apache.kafka.clients.consumer.OffsetOutOfRangeException:偏移超出范围,没有为分区配置重置策略:'但流应用程序使用属性'StreamsConfig.consumerPrefix(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG),“最早”'......
我认为这与留存率有关,但我不知道是什么?
【问题讨论】: