dubbo3.0.7指定failfast失效

配置

@Bean
@DubboReference(url = "${spring.application.url:}", cluster = "failfast")
public ReferenceBean<DemoService> demoService() {
    return new ReferenceBean<>();
}


@Resource
private DemoService demoService;
@GetMapping(value = "/")
public String hello() throws Exception {
    log.info("recv a hello request");
    try {
        return demoService.sayHello();
    } catch (Exception e){
        log.error("",e);
        throw e;
    }
}

现象

debug:

提问55.png

url:

提问56.png

指定为cluster=failfast,url中已经写入,但仍是FailoverClusterInvoker执行 尝试使用yaml配置,仍无效 尝试使用3.0.4,仍无效 尝试配置为其他容错方式,仍使用FailoverClusterInvoker 尝试使用2.6.6版本,相同配置无此问题,debug跟踪到使用为FailfastClusterInvoker执行

原提问者GitHub用户xlq20080808

展开
收起
大圣东游 2023-05-11 19:01:41 85 分享 版权
1 条回答
写回答
取消 提交回答
  • 使用url方式不使用注册中心,不可使用集群容错策略,走默认FailoverClusterInvoker,实现类似快速失败将retries参数修改为0

    原回答者GitHub用户xlq20080808

    2023-05-12 10:51:30
    赞同 展开评论
问答标签:
问答地址: