Spring云流"Found no committed offset"

Spring Cloud stream "Found no committed offset"

我正在使用 Spring Cloud Stream 和 Kafka 绑定器。我可以看到,一旦应用程序启动,它会在每分钟 之后为我的应用程序中配置的所有输入绑定抛出 INFO 级别日志

配置在application.properties

spring.cloud.function.definition=consumeMessage
spring.cloud.stream.bindings.consumeMessage-in-0.destination=Kafka-stream
spring.cloud.stream.bindings.consumeMessage-in-0.group=Kafka-stream-consumer-group

日志是-

2021-06-25 11:26:51.329  INFO 89511 --- [pool-3-thread-3] o.a.k.c.c.internals.ConsumerCoordinator  : [Consumer clientId=consumer-Kafka-stream-consumer-group-5, groupId=Kafka-stream-consumer-group] Found no committed offset for partition Kafka-stream-0

实际上,我认为这不应该发生,因为启用了自动提交偏移量

auto.commit.interval.ms = 5000
    auto.offset.reset = latest
    bootstrap.servers = [localhost:9092]
    check.crcs = true
    client.dns.lookup = default
    client.id = 
    client.rack = 
    connections.max.idle.ms = 540000
    default.api.timeout.ms = 60000
    enable.auto.commit = true
    exclude.internal.topics = true

我是不是在配置中遗漏了什么?

看起来我们每次计算指标时都会收到此日志。建议移动 class

org.apache.kafka.clients.consumer.internals.ConsumerCoordinatorWARN级别

查看 this 线程以获取更多讨论。 @garyrussell 仅供参考