Search code examples
springapache-kafkaspring-cloud-streamspring-cloud-stream-binder-kafka

Spring Cloud stream "Found no committed offset"


I am using Spring Cloud Stream with Kafka binders. I could see that once the application starts it throws INFO level logs after every minute for all the input bindings configured in my application.

Configuration in the 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

And the logs are-

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

Actually, this should not happen in my opinion because the auto-commit offset is enabled

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

Did I miss something in the configuration?


Solution

  • Looks like we're getting this log each time a metric is calculated. The suggestion is moving the class

    org.apache.kafka.clients.consumer.internals.ConsumerCoordinator to WARN level

    Check this thread for more discussion. @garyrussell fyi