-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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
dubbo TagRouter does not work with dubbo:parameter #3875
Comments
I test and both these two ways can work: |
Sorry |
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Steps to reproduce this issue
<dubbo:service/>
中加上tag="groupA"
我们叫他p1
,另一个不加tag 我们叫他p2
.<dubbo:reference>
标签中添加<dubbo:parameter key="dubbo.tag" value="groupA"/>
之后将consumer 示例启动tag="groupA"
at<dubbo:service/>
calledp1
, another with no tag calledp2
. start them.<dubbo:parameter key="dubbo.tag" value="groupA"/>
inside of<dubbo:reference>
.Expected Result
因为拥有相同的tag声明,consumer本应该会调用到
p1
示例.consumer would connect
p1
because of the same tag definitionActual Result
但consumer依然可能连接到
p2
示例.consumer also connects
p2
.如果把 步骤3 的标签改为在调用代码中使用
RpcContext.getContext().setAttachment("dubbo.tag","groupA")
,是可以正常工作的。请问这两种方式有什么区别呢?通过分析源码发现 在 RegistryDiscovery 中将consumer 端的parameter 整合到providerUrl 中。 请问为什么需要这步操作?
The text was updated successfully, but these errors were encountered: