Skip to content
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

Support contextual context propagation #626

Closed
FroMage opened this issue Jul 16, 2021 · 2 comments · Fixed by #635
Closed

Support contextual context propagation #626

FroMage opened this issue Jul 16, 2021 · 2 comments · Fixed by #635
Labels
enhancement New feature or request
Milestone

Comments

@FroMage
Copy link
Contributor

FroMage commented Jul 16, 2021

Since a few releases already, SR-CP supports contextual context propagation, where you can affect the set of contexts that should be propagated in a given scope using the @WithThreadContext annotation on a method (via a CDI interceptor), or an equivalent API.

But in order to do that, you need to use the thread-local ThreadContext via SmallRyeThreadContext.getCurrentThreadContext() rather than create one yourself, in https://github.com/smallrye/smallrye-mutiny/tree/main/context-propagation/src/main/java/io/smallrye/mutiny/context

I can whip up a PR for that with some tests, probably next week if I don't forget.

@jponge
Copy link
Member

jponge commented Jul 16, 2021

That'd be great thanks @FroMage

@FroMage
Copy link
Contributor Author

FroMage commented Jul 21, 2021

PR created.

@jponge jponge added this to the 1.0.0 milestone Jul 22, 2021
@jponge jponge added the enhancement New feature or request label Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants