You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure that the close method does not enter into an infinite loop.
Actual Behaviour
I have four projects using Micronaut Kafka, each with several @KafkaListener annotations. In one project where I am upgrading from Micronaut 3 to Micronaut 4, I'm encountering some integration tests that never finalize the context. After analyzing it, I noticed that the ConsumerState.close() method in one of my @KafkaListener annotations was entering an infinite loop, waiting for the closedState to be different from POLLING. There's nothing special about this specific @KafkaListener; below is a summary of its configuration.
My workaround was to downgrade the micronaut-kafka to version 5.1.2.
implementation("io.micronaut.kafka:micronaut-kafka") version {
strictly '5.1.2'
}
Steps To Reproduce
Unfortunately, I cannot create a test case. I have four projects using Micronaut Kafka 5.3.0, and only one of them, within one of the @KafkaListener annotations, presented this issue. This project is the largest among them.
Environment Information
Linux Mint 23.3
JDK correto 17, 21
Micronaut 4.3.3
Example Application
No response
Version
5.2.0, 5.3.0
The text was updated successfully, but these errors were encountered:
I had the same issue during tests. The problem seems to be the logic used to set the state of the kafka consumer: the catch block below in ConsumerState class will not catch anything if the code that polls and processes the kafka records catches Exception (and at least when batching, which is my case, there is such a catch block).
Expected Behavior
Ensure that the close method does not enter into an infinite loop.
Actual Behaviour
I have four projects using Micronaut Kafka, each with several @KafkaListener annotations. In one project where I am upgrading from Micronaut 3 to Micronaut 4, I'm encountering some integration tests that never finalize the context. After analyzing it, I noticed that the ConsumerState.close() method in one of my @KafkaListener annotations was entering an infinite loop, waiting for the closedState to be different from POLLING. There's nothing special about this specific @KafkaListener; below is a summary of its configuration.
My workaround was to downgrade the micronaut-kafka to version 5.1.2.
Steps To Reproduce
Unfortunately, I cannot create a test case. I have four projects using Micronaut Kafka 5.3.0, and only one of them, within one of the @KafkaListener annotations, presented this issue. This project is the largest among them.
Environment Information
Linux Mint 23.3
JDK correto 17, 21
Micronaut 4.3.3
Example Application
No response
Version
5.2.0, 5.3.0
The text was updated successfully, but these errors were encountered: