gRPC Context propagation does not work #13959
Labels
area/grpc
gRPC
kind/bug
Something isn't working
triage/out-of-date
This issue/PR is no longer valid or relevant
Describe the bug
If I have
ServerInterceptor
in which I set up some gRPCContext
call a different service in a different thread, theContext
isn't propagated.Expected behavior
I expect to able to use
Context.current()
to have what I set inServerInterceptor
Actual behavior
The
Context
s are different in different threads, and theContext
I set in my grpc interceptor is no longer valid.To Reproduce
./mvnw quarkus:dev
grpcurl -v -proto=src/main/proto/helloworld.proto -plaintext -d '{"name": "abc"}' localhost:9000 helloworld.Greeter.SayHello
, it workssrc/main/java/org/acme/MyService.java
and uncommentDOES NOT WORK
part, try again. It'll fail.Configuration
Environment (please complete the following information):
uname -a
orver
:Darwin cihat-layer-mbp.local 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64
java -version
:mvnw --version
orgradlew --version
):Additional context
Original discussion with @cescoffier and @FroMage at https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/Passing.20gRPC.20context.20around/near/220134523
This SO question/answer (non-Quarkus) describes my issue very well: https://stackoverflow.com/questions/47231289/how-to-pass-on-a-traceid-from-grpcs-context-to-another-thread-threadpool
I would like to see a workaround and/or a fix, and would love to see the docs updated as well. Many thanks!
The text was updated successfully, but these errors were encountered: