为什么dubbo提供者重试配置无效?
dubbo版本:2.7.14 春云&&注册中心 nacos 2.0.3
我在application.yml中设置了dubbo.provider.retries=0,当它注册到nacos时,似乎配置生效了。
但是当消费者调用其中一个方法时,消费者仍然重试了3次(默认次数)。那么为什么配置无效让我感到困惑。
如果您有什么想法,请告诉我,谢谢!抱歉我的英语不好...
dubbo version:2.7.14
spring cloud && nacos 2.0.3 for registration center
I set dubbo.provider.retries=0 in application.yml, and when it registers to nacos, seems that the configuration is effetive.
But when the consumer invoke one of the methods, consumer still retried 3 times(defalut times). So why the configuration is ineffetive confuse me.
If you have some ideas, please tell me, thanks! Sorry for my poor English...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查消费者的配置。
https://dubbo.apache.org/zh/docs /v2.7/user/configuration/xml/
Consumer的配置具有更高的优先级。
Check configuration of consumer.
https://dubbo.apache.org/zh/docs/v2.7/user/configuration/xml/
Configuration of consumer has a higher priority.
它的重试配置和超时配置有所不同。
正如 FailoverClusterInvoker 中所知,当调用程序关闭时,它将重试其他调用程序。
但是当有两个不同的调用者重试时,调用者应该选择哪个效果。
对于dubbo 2.7,重试来自url消费者,
当调用者创建时,它将被多次引用
org.apache.dubbo.rpc.cluster.support.ClusterUtils.mergeUrl
使用最终提供者的配置
并在 3.2 中
此 getUrl() 仅在参考配置中的配置时更改。
在超时中,每个提供者调用者都可以有自己的超时。
it has differenc in retries config with timeout config.
so as known in FailoverClusterInvoker ,it will retry an other invoker when invoker is down.
but when there are two invokers with difference retries invoker shoule which effect.
as for dubbo 2.7 the retry come from url consumer
it will be referesh many times as invoker be create in
org.apache.dubbo.rpc.cluster.support.ClusterUtils.mergeUrl
and use final provider's config
and in 3.2
this getUrl() only changed when config in reference config.
in timeout every provider invoker can has own timeout.