Pre-check
- [x] I am sure that all the content I provide is in English.
Search before asking
- [x] I had searched in the issues and found no similar issues.
Apache Dubbo Component
Java SDK (apache/dubbo)
Dubbo Version
The documentation claims that Dubbo 3 has fixed the attachment parameter transparency issue, but the code still silently propagates these parameters. The root cause is in ConsumerContextFilter, where supportedSelectors defaults to an empty set.
if (CollectionUtils.isNotEmpty(supportedSelectors)) {
xxxxx
} else {
((RpcInvocation) invocation)
.addObjectAttachments(RpcContext.getServerAttachment().getObjectAttachments());
}
Steps to reproduce this issue
Prepare three applications with the following relationships: A ---> B ---> C
A-->B: RpcContext.getClientAttachment().setAttachment("jyz", "pass-through");
What you expected to happen
The attachment received by C includes {"jyz":"pass-through"}
.
Anything else
No response
Are you willing to submit a pull request to fix on your own?
- [x] Yes I am willing to submit a pull request on my own!
Code of Conduct
- [x] I agree to follow this project's Code of Conduct