Srumith Uplanchi
Srumith Uplanchi

Reputation: 85

application context for grpc server

We have an application running on grpc-server in java. We have a requirement to set application-context for this application. Can you please help with some sample code?

Currently, my URL looks like https://host:port/ but we want it to be running on https://host:port/example-server.

Thanks Srumith.

Upvotes: 0

Views: 446

Answers (1)

Eric Anderson
Eric Anderson

Reputation: 26464

While technically possible by modifying the fullMethodName of MethodDescriptors, gRPC does not work easily from other paths. It would be a burden on both the client and the server and your clients would not be easily configured to use a different server. The recommendation is "don't do that."

You didn't provide the reason you need such behavior. Generally there is a much better alternative, but I can't provide alternative options because I don't know your use case.

Upvotes: 0

Related Questions