-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
False warning log for not committed offsets on CooperativeStickyAssignor strategy #2991
Milestone
Comments
I think you are right and we can check for empty collection before printing that warning. Please, consider to contribute the fix: https://github.com/spring-projects/spring-kafka/blob/main/CONTRIBUTING.adoc |
sobychacko
added a commit
to sobychacko/spring-kafka
that referenced
this issue
Jan 17, 2024
Fixes: spring-projects#2991 There is a warning from `KafkaMessageListenerContainter#checkRebalanceCommits` that unconditionally logs offsets not being committed. Because of this unconditional check, the messages are very likely to be false positives. Fixing this by adding a check to see if there are indeed uncommitted records.
sobychacko
added a commit
to sobychacko/spring-kafka
that referenced
this issue
Jan 17, 2024
Fixes: spring-projects#2991 There is a warning log from `KafkaMessageListenerContainter#checkRebalanceCommits` that unconditionally prints that offsets could not be committed. Because of this unconditional check, the messages are very likely to be false positives. Fixing this by adding a check to see if there are indeed uncommitted records.
artembilan
pushed a commit
that referenced
this issue
Jan 17, 2024
Fixes: #2991 There is a warning log from `KafkaMessageListenerContainter#checkRebalanceCommits` that unconditionally prints that offsets could not be committed. Because of this unconditional check, the messages are very likely to be false positives. Fixing this by adding a check to see if there are indeed uncommitted records.
artembilan
pushed a commit
that referenced
this issue
Jan 17, 2024
Fixes: #2991 There is a warning log from `KafkaMessageListenerContainter#checkRebalanceCommits` that unconditionally prints that offsets could not be committed. Because of this unconditional check, the messages are very likely to be false positives. Fixing this by adding a check to see if there are indeed uncommitted records. (cherry picked from commit f9476a3)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
spring-kafka:3.0.12 (code of
main
and3.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 serviceThe message led us to the following code in
spring-kafka
spring-kafka/spring-kafka/src/main/java/org/springframework/kafka/listener/KafkaMessageListenerContainer.java
Line 1714 in 659b066
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 notThe text was updated successfully, but these errors were encountered: