GCP Funqy CloudEventsFunction and Kotlin Coroutines #38985
mdietrichstein
started this conversation in
Community
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm attempting to deploy a reactive/async CloudEventsFunction to Google Cloud, and we are using Kotlin. I would like to implement the function reactively, which, according to the docs, is supported. All I need to do is return a
Uni
.So, my function currently looks like this:
This works. However, I now want to use Kotlin coroutines with
mutiny-kotlin
like this:The issue is that CDI breaks. Specifically, in my case, accessing any
@RequestScoped
dependency results in an error stating that RequestScope is not active. I'm fairly certain that the reason for this is the closure inGlobalScope.async
running on a different thread. Is there a way to integrate Quarkus, Mutiny, and Kotlin so that this works?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions