HanlyL opened a new issue, #15850:
URL: https://github.com/apache/dubbo/issues/15850

   ### 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](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   Dubbo 3.3.2
   
   ### Steps to reproduce this issue
   
   Start 4 service provider instances, each configured with different 
dubbo.provider.tag (e.g., t-01, t-02...)
   Consumer uses the following Reference configuration:
   @DubboReference(
       interfaceClass = BpRcvMsgApi.class,
       version = "1.0.0",
       group = "all-t",
       cluster = "broadcast"
   )
   private ApiTest api;
   Invoke api.test() method
   Exception thrown: No provider available for the service
   
   ### What you expected to happen
   
   The broadcast call should succeed and send requests to all 4 provider 
instances.
   
   
   ### Anything else
   
   TagStateRouter filters out all providers in the router chain and returns an 
empty list, causing the call to fail.
   The issue is in 
org.apache.dubbo.rpc.cluster.router.tag.TagStateRouter.filterUsingStaticTag(),if
 tag is Null:
               result = filterInvoker(
                       invokers, invoker -> 
StringUtils.isEmpty(invoker.getUrl().getParameter(TAG_KEY)));
   When tagRouterRule is not configured, this method performs static tag 
filtering with exact string matching. Since providers have tag=t-01 and 
broadcast requests don't specify a tag, the matching fails and eventually 
returns an empty list.
   Can at least one wildcard * be added?like:
   result = filterInvoker(invokers, invoker -> 
       "*".equals(tag) || tag.equals(invoker.getUrl().getParameter(TAG_KEY))
   );
   
   ### 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](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to