Skip to content

GH-1210: Add Kotlin suspend functions support (#2460) #2519

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 2 commits into from
Aug 31, 2023

Conversation

garyrussell
Copy link
Contributor

Back port of issue #2460

…projects#2460)

* spring-projectsGH-1210: Add Kotlin suspend functions support

Fixes spring-projects#1210

Kotlin Coroutines are essentially `Future` wrapping.
Therefore, it is natural to have `suspend` support on `@RabbitListener`
methods as we do now for `CompletableFuture` and `Mono`

* Introduce some utilities since we cannot reuse existing from Spring Messaging:
they are there about Kotlin Coroutines only for reactive handlers
* Some code clean up in the `RabbitListenerAnnotationBeanPostProcessor`
for the latest Java
* Add optional dep for `kotlinx-coroutines-reactor` and document the feature

* * Remove unused import
@artembilan artembilan merged commit 1bc1ae9 into spring-projects:2.4.x Aug 31, 2023
@garyrussell garyrussell deleted the GH-1210-24x branch August 31, 2023 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants