zuul 并发下的重试配置

来源:互联网 发布:郑州菜鸟网络 编辑:程序博客网 时间:2024/06/12 18:15
hystrix:  threadpool:    default:      coreSize: 500  command:    default:      execution:        timeout:          enabled: false #经测算并发下需要设置为false才会都去重试,  hystrix 的超时时间直接禁用掉,这样就没有超时的一说了,因为永远也不会超时了        isolation:          thread:            timeoutInMilliseconds: 80000ribbon:  ConnectTimeout: 30000  #250  ReadTimeout: 1000 #1000  OkToRetryOnAllOperations: true  MaxAutoRetriesNextServer: 10  MaxAutoRetries: 0  okhttp:    enabled: true
需要在pom 文件中引入spring-retry:
<dependency>    <groupId>org.springframework.retry</groupId>    <artifactId>spring-retry</artifactId></dependency>

原创粉丝点击