2

I am trying to run a online Spring Boot project locally. When I was calling an RPC service, sometimes the request was executed in another machine because of loadbalance. How to specify a consumer for a specific dubbo service? The dubbo config for for consumer is:

dubbo:
   application:
      name: ${spring.application.name}
   protocol:
      name: dubbo
      port: "50020"
   consumer:
      check: false 
      loadbalance: random 
      retries: 0 
      timeout: 10000

and the reference

@DubboReference(check = false)
private RpcPayService payService;

The config for provider

dubbo:
   application:
      name: ${spring.application.name}
   protocol:
      name: dubbo
      port: "50002"
   consumer:
      check: false
      retries: 0 
      loadbalance: random 
      timeout: 10000

and the provider

@DubboService
@Slf4j
public class RpcPayServiceImpl implements RpcPayService {
}
Koko
  • 75
  • 5

0 Answers0