You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would love to have an annotation similar to @ALL for @Inject that generates a map/list of all gRPC clients defined in the application.properties. So if we defined an application.yml as follows:
To exemplify why this may be useful, we essentially have a microservice that receives an execution graph of requests that should be sent to some gRPC servers. The microservice itself does not care about which gRPC servers there are, it just gets the name of the server as part of the requests. In order to implement this, we currently need to hardcode every server using @GrpcClient, which means that if we need to add another gRPC server, we need to release a new application version of the microservice, since all available gRPC servers are hardcoded in the code. Instead, it would be much nicer to just deploy the new gRPC server, update the application.yml with the host/port of the new server, without needing to update the source code. But for that, we need to dynamically retrieve all gRPC clients from the application config.
Implementation ideas
No response
The text was updated successfully, but these errors were encountered:
We could provide the names, but we cannot rely on CDI because they all use different interfaces.
Actually, you might be able to inject all the Bindable beans. @alesj WDYT?
Description
Feature request
I would love to have an annotation similar to @ALL for @Inject that generates a map/list of all gRPC clients defined in the application.properties. So if we defined an application.yml as follows:
Doing something like
Would generate a map of name to client.
Use case
To exemplify why this may be useful, we essentially have a microservice that receives an execution graph of requests that should be sent to some gRPC servers. The microservice itself does not care about which gRPC servers there are, it just gets the name of the server as part of the requests. In order to implement this, we currently need to hardcode every server using @GrpcClient, which means that if we need to add another gRPC server, we need to release a new application version of the microservice, since all available gRPC servers are hardcoded in the code. Instead, it would be much nicer to just deploy the new gRPC server, update the application.yml with the host/port of the new server, without needing to update the source code. But for that, we need to dynamically retrieve all gRPC clients from the application config.
Implementation ideas
No response
The text was updated successfully, but these errors were encountered: