Skip to content

1.2.0

Latest

Choose a tag to compare

@fabiangftech fabiangftech released this 02 Dec 10:07
· 8 commits to main since this release

New API since 1.1.1, all of it additive: code generated by a 1.0.x or 1.1.x processor keeps running on 1.2.0, and the configuration is unchanged. One build can now fail that used to pass: a Spring Boot native image with resilience4cata beans and no generated classes fails during AOT processing, where it used to run them unprotected.

Added

  • Force a circuit breaker open, or reset it, through the Spring Boot and Micronaut endpoints: POST …/resilience4cata/{instance} with {"circuitBreaker": "force-open"} or "reset" calls the breaker's forceOpen() or reset() and answers with the instance's snapshot. Spring Boot answers only once the endpoint's access is unrestricted; on Micronaut the operation stays sensitive until endpoints.resilience4cata.write-sensitive is false (Spring Boot, Micronaut).
  • Handles for retries, hedges and timeouts: registry.retry(id), hedge(id) and timeout(id) return a RetryHandle, HedgeHandle and TimeoutHandle (id(), config(), snapshot()), like the other policies' (Handles).
  • registry.addInstanceListener(…): called with each new instance as a PolicyInstance, its PolicyKind and id, so a metrics bridge can look up that one handle (Another metrics library).
  • ConfigException.details(): each problem's code apart from its message, as ConfigProblem records, for code that handles problems by code (Configuration).
  • Ticker.addAdvanceListener(…) returns a Registration that removes the listener; testkit's ManualClock implements it. A registry that is no longer reachable now stops listening to its ticker, so one ManualClock can serve many registries without keeping them alive (Testing).
  • Resilient.shutdownThreads(Duration) stops the library's own threads, for a web application that a servlet container undeploys or reloads while the JVM keeps running: they no longer keep its class loader alive (Troubleshooting).
  • Spring Boot native images: a missing annotation processor fails the build. The R4C-SPR-006 check now also runs during Spring's AOT processing, so a bean with resilience4cata annotations and no generated class fails the native build instead of running unprotected in the image (R4C-SPR-006).
  • The timeout watchdog's and the async timer's ticks grow back once the timeouts that needed a short one are gone (their registry dropped, their application reloaded), instead of staying at the shortest ever used (Timeout).

Install: dev.resilience4cata:resilience4cata-bom:1.2.0 (installation). Full changelog: https://resilience4cata.dev/en/changelog