Open felixkrull-neuland opened 7 months ago
Hey @felixkrull-neuland,
Thank you for this report! Super useful, I did upgrade to Kafka x.7.0 last week and haven't had a chance to work around this particular x.7.0 release. Not sure if it's that, or on kotlin-kafka, but can easily check with your reproducer!
Thank you, will report back soon-ish ☺️
Very strange that wasn't covered by the tests... I ran the test suite 100x before releasing 🤔
I was looking into this issue, but I had a week of PTO so this fell flat. On my extremely brief investigating, I am currently still looking at a change in Kafka itself, or a change in configuration properties (from library side).
I am not entirely sure if Gradle explicit version proofed Kafka version change was not the culprit, I have had a lot of issues with Gradle explicit versions.
See also, https://github.com/nomisRev/kotlin-kafka/issues/173.
When using 0.4.0, the Kafka receiver doesn't correctly connect to the Kafka cluster in certain situations. I've seen this in a test using a Kafka test container: the first test using a particular container instance would always fail because it doesn't receive any messages in the expected time. However, any tests run after the first would (usually) succeed, regardless of order. I managed to create a minimal sample that reproduces the problem: https://github.com/felixkrull-neuland/kotlin-kafka-minimal-repro
With 0.3.1, the test succeeds. With 0.4.0, it fails. Judging by the logs, it looks like some part of the cluster (the consumer offsets topic?) isn't set up on the first request, but 0.4.0 doesn't retry in the way 0.3.1 did.
Excerpt when running with 0.3.1:
And with 0.4.0, it just gives up and then gets stopped due to the 5-second timeout: