-
Notifications
You must be signed in to change notification settings - Fork 809
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
请问如何根据消息体内容选择服务调用呢? #793
Comments
Do you have a fixed set of targets (prod, dev, stage) that you have to switch between or is it generic? Currently there is no easy way to do that only:
But, then there is no injection support for the stub/channel. I plan to create a injection factory: https://github.com/yidongnan/grpc-spring-boot-starter/issues/741#issuecomment-1247148603 Then you can do:
Does this answer your question? |
不是固定的,调用的服务端是会变化的,需要在监听到服务变化时,更新要调用的地址;感谢您提供的思路我去测试一下。 |
暂时已通过自定义DiscoveryClientResolverFactory实现,期待2.15.0版本的GrpcClientInjector实现,使用GrpcClientInjector应该可以更好的解决我的问题。 |
Thanks for your feedback. |
老师您好,我现在有个场景是需要根据调用时参数对象值,进行选择要调用的服务。
我的想法是自己写一个自定义选择策略,但是琢磨了半天,没找到怎么从选择方法中获取参数对象,请问有什么方法可以取到吗?
或者您有更好的方案吗?
期待您的指点。
The text was updated successfully, but these errors were encountered: