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
Introduce a variation of contextCapture
that captures the context immediately
#3501
Comments
Hello, @dstepanov! Can you please provide a certain usecase where contextCapture does not work (test or any reproduceable example with explicit expectations) Thanks, |
In Micronaut integration I need to capture the context manually https://github.com/micronaut-projects/micronaut-reactor/pull/306/files#diff-6bfb100b108ce8193896caf0431107f8a207233bd1545b7ac94e692a001ea901R38 |
@dstepanov, I meant a reproducer that shows a specific scenario where Thanks, P.S. As it is demonstrated in the linked PR, |
This is an enhancement request, not a bug report. The My use case differs. I have a try-resources block that modifies the thread-local. This state I want to capture into the Reactor context immediately on some new method invocation. There might be better naming than |
I agree with the sentiment and I think we could consider |
Currently,
contextCapture
is:Personally, I don't see it much useful as the actual subscription might be way outside of the user code.
It would be nice to have something like
currentContextCapture
as that would capture the current thread-local context and add it to the reactor context, something like:One of the use cases would be:
The text was updated successfully, but these errors were encountered: