我有一个具有以下参数的Kafka用户:
bootstrap.servers=<server.list>
group.id=provider.consumer
auto.offset.reset=earliest
enable.auto.commit=false
max.poll.interval.ms=10000
isolation.level=read_committed
max.poll.records=100000
当我启动消费者时,我收到了此消息
[org.apache.kafka.clients.consumer.internals.Fetcher.Thread-5(583)] [Consumer clientId=consumer-2, groupId=conductor.consumer] Resetting offset for partition mytopic-0 to offset 0.
几分钟后,将打印下一张:
[org.apache.kafka.clients.FetchSessionHandler.Thread-5(381)] [Consumer clientId=consumer-2, groupId=conductor.consumer] Node 13 was unable to process the fetch request with (sessionId=2132852145, epoch=127): INVALID_FETCH_SESSION_EPOCH.
我的应用程序此时停止。我的集群中有Kafka version 2.2.1
。
当我退出mytopic
并重置数据提取时,一切正常。但是我无法在生产中做到这一点。我该如何解决这些问题?