时间:2024-6-24 作者:老大夫 分类: SpringCloud
默认重试功能是关闭的
在客户端config建立FeignConfig类配置参数
@Configuration
public class FeignConfig {
@Bean
public Retryer myRetryer()
{
//return Retryer.NEVER_RETRY; //Feign默认配置是不走重试策略的
//最大请求次数为3(1+2),初始间隔时间为100ms,重试间最大间隔时间为1s
return new Retryer.Default(100,1,3);
}
}
推荐阅读:
OpenFeign日志打印功能
OpenFeign更换HTTPClient提升性能
OpenFeign请求压缩功能
gateway 报错:Unable to find RoutePredicateFactory with name My
Resilience4J的CircuitBreaker断路器之熔断
Resilience4J的BulkHead舱壁隔离
OpenFeign超时控制功能
四种限流算法
报错:I/O error on POST request for "http://localhost:9411/api/v2/spans": Connect to http://localhost:9411 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: no further information
SpringCloud之OpenFeign负载均衡工具
行动消除疑虑