vertx-grpc icon indicating copy to clipboard operation
vertx-grpc copied to clipboard

ContextInterceptor: sessionId between two servers

Open andrm opened this issue 11 months ago • 2 comments

I'm trying to use the Context Server Interceptor from the Docs: https://vertx.io/docs/vertx-grpc-netty/java/#_grpc_server I'm surprised that the context seems to be shared among all calls. I was under the impression from the example (using a sessionId), that the context is not shared between completely unrelated calls. How is this supposed to work?

Version

4.5.11

Reproducer

  • https://github.com/andrm/vertxcontext

Steps to reproduce

  1. Run the server
  2. Run the client
  3. The client makes two calls, one to the context-intercepting server instance, the second to a plain grpc vertx service, no interceptor
  4. The second call should not have the sessionId

andrm avatar Jan 15 '25 13:01 andrm

I suggest removing ContextInterceptor entirely and suggest Vertx 5 and ContextStorag instead. CI is too complicated to work with. I can und work with Contexts in verticles, but grpc-netty seems to be different entirely. At the least it needs to be documented better.

andrm avatar Jan 22 '25 09:01 andrm

I do agree with you, actually grpc-netty is deprecated in vertx 5

vietj avatar Jan 22 '25 13:01 vietj