Skip to content

False warning log for not committed offsets on CooperativeStickyAssignor strategy #2991

@hrabur

Description

@hrabur

spring-kafka:3.0.12 (code of main and 3.0.x branches show the same problem)

Recently we switched to partition.assignment.strategy: org.apache.kafka.clients.consumer.CooperativeStickyAssignor, as a consequence, we started to observe false positive warning messages during the restart of our service

These offsets could not be committed; partition(s) lost during rebalance: {}

The message led us to the following code in spring-kafka

this.logger.warn(() -> "These offsets could not be committed; partition(s) lost during rebalance: "

We believe the the warning is false positive, because as seen from the log message the uncommitted map is empty (... rebalance: {}), i.e. all offsets are properly committed.

As it is seen in the code the warning log message is printed always, without taking into consideration if uncommitted is empty or not

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions