Expand Kotlin "coroutines and Mutiny" documentation
See original GitHub issueDescription
Presently, the Kotlin guide includes a small section about using coroutines: “Kotlin coroutines and Mutiny”. However, the linked mutiny-kotlin
documentation only describes the extension functions, not how to use coroutines with Kotlin.
Kotlin coroutines provide a imperative programming model that actually gets executed in an asynchronous, reactive manner. To simplify the interoperation between Mutiny and Kotlin there is the module io.smallrye.reactive:mutiny-kotlin, described here.
After fiddling around with the getting-started
project, I was able to use coroutines (suspend fun
) by switching to “reactive” libraries:
quarkus-resteasy-reactive
instead ofquarkus-resteasy
quarkus-resteasy-reactive-jackson
instead ofquarkus-resteasy-jackson
io.smallrye.reactive:mutiny-kotlin
instead ofio.quarkus:quarkus-resteasy-mutiny
- potentially others?
Implementation ideas
Provide a minimal Kotlin coroutines example; or, make clear what dependencies, configuration, and code (if applicable) is required to use coroutines in your application.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (5 by maintainers)
Closing this as it seems to be covered by https://github.com/quarkusio/quarkus/pull/21416
We are recommending RestEasy reactive. See https://quarkus.io/blog/resteasy-reactive-smart-dispatch/.
RestEasy is still supported, but the reactive variant provides more features.