-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Project Reactor ServerRequestContext lost when using Mono.fromFeature() #5549
Comments
If i change .fromFuture(calculateAsync()) to .fromCallable(() -> calculateAsync().get()) then it works fine |
I think that is the way to go. Using |
@graemerocher yes, I already changed everything in my "real" project to fromCallable. But with flowable it worked fine, the CompletableFuture there is not mine but returned by a third party library. |
so in general as part of the shift to reactor we need to rewrite the instrumentation logic in reactor to use the context https://projectreactor.io/docs/core/release/api/reactor/util/context/Context.html This work is not undertaken yet but will solve the issue you see for Reactor in the future |
@graemerocher ok, thank you! I'll just use fromCallable for now. |
@dstepanov this still an issue after your changes? |
We notice a similar issue with Mono response which we notice only occurs when the runtime is jetty or azure_function but for netty, it works fine. Are there any updates on the issue? |
When using project Reactor flow ServerRequestContext is lost when Mono is created by Mono.fromFuture. Here's the example code (i think it's too small to publish on github):
If you go to /context/flowable it's ok, context present but in /context/flux not.
Task List
Steps to Reproduce
Expected Behaviour
The output should be Hello ok
Actual Behaviour
The output is Hello nok
Environment Information
The text was updated successfully, but these errors were encountered: