Resilience4j v0.14.0 发布了,Resilience4j 是一个轻量级的容错组件,其灵感来自于 Hystrix,但主要为 Java 8 和函数式编程所设计。轻量级体现在其只用 Vavr 库(前身是 Javaslang),没有任何外部依赖。而 Hystrix 依赖了 Archaius ,Archaius 本身又依赖很多第三方包,例如 Guava、Apache Commons Configuration 等。
Resilience4j 提供了如下几款核心组件
-
resilience4j-circuitbreaker: Circuit breaking
-
resilience4j-ratelimiter: Rate limiting
-
resilience4j-bulkhead: Bulkheading
-
resilience4j-retry: Automatic retrying (sync and async)
-
resilience4j-cache: Response caching
限速组件架构:
更新内容包括 bug 修复、新增特性以及所依赖的组件,具体如下:
- Issue #196: 新增一个新的 resilience4j-feign 模块
- Issue #241: 新增在 Spring Boot 中配置 automaticTransitionFromOpenToHalfOpenEnabled 的支持
- Issue #248: 支持在返回 mono 或 flux 的方法上使用 @circuitbreaker
- Issue #286: Spring Boot emitted warnings about invalid actuator endpoint name
- Issue #307: Bulkhead Support in Prometheus
- Issue #331: Fixed Retry.decorateCallable which catched RuntimeException instead of Exception
- Issue #332: Bulkhead reactor operator did not release semaphore on cancel
- Issue #338: Fixed that SpringBoot2 auto-configuration fails when not specifying all properties
- Issue #344: Exposed bulkhead max allowed concurrent calls metric
- Issue #348: Added Spring Boot 2 support for resilience4j-retry
- Issue #351: Fixed that CircuitBreaker AutoTransitioner prevents JVM shutdown
- Issue #359: Support for retryOnResult method and Completable, Maybe types missing
- Issue #383: Added Retry support to Spring Reactor
- Updated Vavr from 0.9.2 to 0.10.0
- Updated Spring 4 from 4.3.15.RELEASE to 4.3.22.RELEASE
- Updated Spring Boot from 1.5.5.RELEASE to 1.5.19.RELEASE
- Updated Spring Boot 2 from 2.0.2.RELEASE to 2.1.3.RELEASE
- Updated Dropwizard Metrics from 3.2.5 to 3.2.6
- Updated Ratpack from 1.5.4 to 1.6.0
- Updated Micrometer from 1.0.5 to 1.1.3
- Updated Prometheus Simple Client from 0.3.0 to 0.6.0
- Updated Feign from 10.0.1 to 10.2.0
- Updated Retrofit from 2.3.0 to 2.5.0
- Updated Spring Reactor from 3.0.7.RELEASE to 3.2.6.RELEASE