redoom opened a new pull request, #15821:
URL: https://github.com/apache/dubbo/pull/15821

   ## Problem
   Previously, Dubbo's cluster fault-tolerance strategy could only be 
configured on the consumer side via `@DubboReference(cluster = "...")`. 
Provider-side configuration via `@DubboService(cluster = "...")` was ignored.
   
   ## Solution
   Modified `RegistryProtocol` to support provider-side cluster configuration 
with consumer-side override capability:
   - Check if consumer has explicitly configured cluster parameter
   - If not, fetch cluster configuration from provider's URL metadata
   - Consumer config takes precedence over provider config
   
   
   ## Usage Example
   
   ### Provider side
   ```java
   @DubboService(cluster = "failsafe")
   public class GreetingServiceImpl implements GreetingService {
       @Override
       public String sayHello(String name) {
           return "Hello " + name;
       }
   }
   ```
   
   ### Consumer side (will use provider's failsafe strategy)
   ```java
   @DubboReference
   private GreetingService greetingService;
   ```
   
   ### Consumer override (explicit config takes precedence)
   ```java
   @DubboReference(cluster = "failover")
   private GreetingService greetingService;
   ```
   
   ## Priority Order
   1. Consumer-side explicit configuration (highest priority)
   2. Provider-side configuration (fallback)
   3. Default strategy: failover
   
   ## Related Issues
   https://github.com/apache/dubbo/issues/15668#issuecomment-3581754102


-- 
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