Skip to content

GH-3740: Fix HandlerAdapter to detect Kotlin suspend functions #3742

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

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

artembilan
Copy link
Member

Fixes: #3740
Issue link: #3740

Even if Kotlin suspend functions are called properly, the acknowledgement is not called because this kind of method is not treated as an asyncReplies mode

  • Fix HandlerAdapter to check for KotlinDetector.isSuspendingFunction() in addition to CompletableFuture & Mono
  • Adjust EnableKafkaKotlinCoroutinesTests.kt to verify that acknowledgement has been called by the Framework

Auto-cherry-pick to 3.3.x & 3.2.x

… functions

Fixes: spring-projects#3740
Issue link: spring-projects#3740

Even if Kotlin `suspend` functions are called properly, the acknowledgement is not called
because this kind of method is not treated as an `asyncReplies` mode

* Fix `HandlerAdapter` to check for `KotlinDetector.isSuspendingFunction()`
in addition to `CompletableFuture` & `Mono`
* Adjust `EnableKafkaKotlinCoroutinesTests.kt` to verify that `acknowledgement` has been called
by the Framework

**Auto-cherry-pick to `3.3.x` & `3.2.x`**
@sobychacko sobychacko merged commit b0db30c into spring-projects:main Feb 13, 2025
3 checks passed
@artembilan
Copy link
Member Author

Thanks for merging!
It could not cherry-pick automatically: will do that manually shortly.

@artembilan artembilan deleted the GH-3740 branch February 13, 2025 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Async suspend function listener not automatically acknowledged?
2 participants