Skip to content

0.3.0

Choose a tag to compare

@fabiangftech fabiangftech released this 27 Oct 13:48
· 354 commits to main since this release

Released 2026-10-25. On Maven Central as dev.resilience4cata:*:0.3.0 (installation, documentation).

Added

  • resilience4cata-opentelemetry: OpenTelemetry metrics. OpenTelemetryMetrics.create(openTelemetry), register(builder) and bindTo(registry) report rejections, retries, give-ups, breaker transitions, timeouts and fallbacks as counters fed by events, and breaker, bulkhead and rate-limiter state as asynchronous gauges read from the snapshot at each collection, so instances created later are included. Same metric names as the Micrometer module. Metrics only, no tracing yet. See OpenTelemetry.
  • resilience4cata-junit: a JUnit Jupiter extension. @ResilienceTest injects a fresh ManualClock and a ResilienceRegistry that follows it into each test (and its @BeforeEach/@AfterEach methods), with seed, startNanos and an opt-in failOnPendingTasks; @ConfigureRegistry methods customize the builder. Needs JUnit 5.10 or newer, JUnit 6 included. See Testing.
  • An async @Timeout call that finishes in time now takes its deadline off a ManualClock at once, so pendingTasks() no longer counts it until the deadline passes.
  • resilience4cata-micrometer: Micrometer metrics in three lines (MicrometerMetrics.create(meterRegistry), register(builder), bindTo(registry)): counters from events (rejections, breaker transitions, retries, give-ups, timeouts, fallbacks) and gauges for every circuit breaker, bulkhead and rate limiter, including instances created after binding. Replaces the hand-written recipe of the observability guide.
  • ResilienceRegistry.onInstanceCreated(Runnable): runs an action once per new policy instance (when a service is wrapped or a pipeline is built, never during a call), so that metrics bridges can register meters for instances created later (Observability).
  • Retry budget for @Retry, RetryConfig and Pipeline: budgetPercent, budgetMinRetriesPerSecond and budgetWindow cap the retries of one retry instance, shared by all its callers, at a reserve per second plus a percentage of its calls in the window, so that an outage does not multiply the load on the failing dependency. budgetPercent turns it on, with a default reserve of 10 retries per second. Off by default; without it, generated code and the success path are unchanged. A refused retry publishes RetryEvent.GaveUp with the new reason BUDGET_EXHAUSTED; RetrySnapshot.budget() shows the window. Config keys defaults.retry.budget… (and configs.…, instances.…, environment variables); new processor error R4C-ATR-007. Retry budget
  • Error codes for the test modules: R4C-TK-001…003 (ManualClock, ResilienceTesting) and R4C-JU-001…003 (the JUnit extension), each documented in the error reference with its fix.
  • The Micrometer and OpenTelemetry modules give every metric the same description (Prometheus # HELP text), checked by a test.