-
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
KafkaListener annotation for batch consumption does not work with Kotlin #699
Comments
Would you mind to share some sample to reproduce? We have this test class so far: https://github.com/spring-projects/spring-kafka/blob/master/spring-kafka/src/test/kotlin/org/springframework/kafka/listener/EnableKafkaKotlinTests.kt, but I agree that batch mode is not presented there. Contribution at least with test-case is welcome! Thanks |
Sure, the sample code is to reproduce is simple if you have a cluster to consume from. |
I have created a pr that adds a test case for this issue, and has a possible solution. if you run the test without the solution you will see the exceptions the bug causes and it will fail. #700 |
Fixes spring-projects/spring-kafka#699 showing issue with batch listener, along with fix fixing checkstyle fixing illegal import
https://github.com/spring-projects/spring-kafka/blob/master/spring-kafka/src/main/java/org/springframework/kafka/listener/adapter/MessagingMessageListenerAdapter.java#L428
This does not work when using a kotlin function to consumer a batch list, as the parameter is not of ConsumerRecord.class. It is a WildcardTemplateImpl.class that exends ConsumerRecord.class
The text was updated successfully, but these errors were encountered: