apache/dubbo

[Bug] Dubbo3.3.2 ,Can not Use broadcast and Tag same time

Ouverte

#15 850 ouverte le 15 déc. 2025

 (0 commentaire) (0 réaction) (0 personne assignée)Java (26 453 forks)batch import
help wantedtype/enhancement

Métriques du dépôt

Stars
 (41 524 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

Pre-check

  • I am sure that all the content I provide is in English.

Search before asking

  • I had searched in the issues 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?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

Guide contributeur