Resilience4j is a fault tolerance library designed for Java8 and functional programming

Overview

Fault tolerance library designed for functional programming

1. Introduction

Resilience4j is a lightweight fault tolerance library inspired by Netflix Hystrix, but designed for Java 8 and functional programming. Lightweight, because the library only uses Vavr, which does not have any other external library dependencies. Netflix Hystrix, in contrast, has a compile dependency to Archaius which has many more external library dependencies such as Guava and Apache Commons Configuration.

⚠️
Netflix Hystrix is no longer in active development, and is currently in maintenance mode.

Resilience4j provides higher-order functions (decorators) to enhance any functional interface, lambda expression or method reference with a Circuit Breaker, Rate Limiter, Retry or Bulkhead. You can stack more than one decorator on any functional interface, lambda expression or method reference. The advantage is that you have the choice to select the decorators you need and nothing else.

// Create a CircuitBreaker with default configuration
CircuitBreaker circuitBreaker = CircuitBreaker.ofDefaults("backendService");

// Create a Retry with default configuration
// 3 retry attempts and a fixed time interval between retries of 500ms
Retry retry = Retry.ofDefaults("backendService");

// Create a Bulkhead with default configuration
Bulkhead bulkhead = Bulkhead.ofDefaults("backendService");

Supplier<String> supplier = () -> backendService
  .doSomething(param1, param2);

// Decorate your call to backendService.doSomething()
// with a Bulkhead, CircuitBreaker and Retry
// **note: you will need the resilience4j-all dependency for this
Supplier<String> decoratedSupplier = Decorators.ofSupplier(supplier)
  .withCircuitBreaker(circuitBreaker)
  .withBulkhead(bulkhead)
  .withRetry(retry)
  .decorate();

// Execute the decorated supplier and recover from any exception
String result = Try.ofSupplier(decoratedSupplier)
  .recover(throwable -> "Hello from Recovery").get();

// When you don't want to decorate your lambda expression,
// but just execute it and protect the call by a CircuitBreaker.
String result = circuitBreaker
  .executeSupplier(backendService::doSomething);

// You can also run the supplier asynchronously in a ThreadPoolBulkhead
 ThreadPoolBulkhead threadPoolBulkhead = ThreadPoolBulkhead
  .ofDefaults("backendService");

// The Scheduler is needed to schedule a timeout on a non-blocking CompletableFuture
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(3);
TimeLimiter timeLimiter = TimeLimiter.of(Duration.ofSeconds(1));

CompletableFuture<String> future = Decorators.ofSupplier(supplier)
    .withThreadPoolBulkhead(threadPoolBulkhead)
    .withTimeLimiter(timeLimiter, scheduler)
    .withCircuitBreaker(circuitBreaker)
    .withFallback(asList(TimeoutException.class, CallNotPermittedException.class, BulkheadFullException.class),
      throwable -> "Hello from Recovery")
    .get().toCompletableFuture();
ℹ️
With Resilience4j you don’t have to go all-in, you can pick what you need.

3. Overview

Resilience4j provides several core modules:

  • resilience4j-circuitbreaker: Circuit breaking

  • resilience4j-ratelimiter: Rate limiting

  • resilience4j-bulkhead: Bulkheading

  • resilience4j-retry: Automatic retrying (sync and async)

  • resilience4j-timelimiter: Timeout handling

  • resilience4j-cache: Result caching

There are also add-on modules for metrics, Retrofit, Feign, Kotlin, Spring, Ratpack, Vertx, RxJava2 and more.

ℹ️
Find out full list of modules in our User Guide.
💡
For core modules package or Decorators builder see resilience4j-all.

4. Resilience patterns

name how does it work? description links

Retry

repeats failed executions

Many faults are transient and may self-correct after a short delay.

overview, documentation, Spring

Circuit Breaker

temporary blocks possible failures

When a system is seriously struggling, failing fast is better than making clients wait.

overview, documentation, Feign, Retrofit, Spring

Rate Limiter

limits executions/period

Limit the rate of incoming requests.

overview, documentation, Feign, Retrofit, Spring

Time Limiter

limits duration of execution

Beyond a certain wait interval, a successful result is unlikely.

documentation, Retrofit, Spring

Bulkhead

limits concurrent executions

Resources are isolated into pools so that if one fails, the others will continue working.

overview, documentation, Spring

Cache

memorizes a successful result

Some proportion of requests may be similar.

documentation

Fallback

provides an alternative result for failures

Things will still fail - plan what you will do when that happens.

Try::recover, Spring, Feign

Above table is based on Polly: resilience policies.

ℹ️
To find more information about resilience patterns check Talks section. Find out more about components in our User Guide.

5. Spring Boot

Setup and usage in Spring Boot 2 is demonstrated here.

6. Usage examples

6.1. CircuitBreaker, Retry and Fallback

The following example shows how to decorate a lambda expression (Supplier) with a CircuitBreaker and how to retry the call at most 3 times when an exception occurs. You can configure the wait interval between retries and also configure a custom backoff algorithm.

The example uses Vavr’s Try Monad to recover from an exception and invoke another lambda expression as a fallback, when even all retries have failed.

// Simulates a Backend Service
public interface BackendService {
    String doSomething();
}

// Create a CircuitBreaker (use default configuration)
CircuitBreaker circuitBreaker = CircuitBreaker.ofDefaults("backendName");
// Create a Retry with at most 3 retries and a fixed time interval between retries of 500ms
Retry retry = Retry.ofDefaults("backendName");

// Decorate your call to BackendService.doSomething() with a CircuitBreaker
Supplier<String> decoratedSupplier = CircuitBreaker
    .decorateSupplier(circuitBreaker, backendService::doSomething);

// Decorate your call with automatic retry
decoratedSupplier = Retry
    .decorateSupplier(retry, decoratedSupplier);

// Execute the decorated supplier and recover from any exception
String result = Try.ofSupplier(decoratedSupplier)
    .recover(throwable -> "Hello from Recovery").get();

// When you don't want to decorate your lambda expression,
// but just execute it and protect the call by a CircuitBreaker.
String result = circuitBreaker.executeSupplier(backendService::doSomething);

6.1.1. CircuitBreaker and RxJava2

The following example shows how to decorate an Observable by using the custom RxJava operator.

CircuitBreaker circuitBreaker = CircuitBreaker.ofDefaults("testName");
Observable.fromCallable(backendService::doSomething)
    .compose(CircuitBreakerOperator.of(circuitBreaker))
ℹ️
Resilience4j also provides RxJava operators for RateLimiter, Bulkhead, TimeLimiter and Retry. Find out more in our User Guide.

6.1.2. CircuitBreaker and Spring Reactor

The following example shows how to decorate a Mono by using the custom Reactor operator.

CircuitBreaker circuitBreaker = CircuitBreaker.ofDefaults("testName");
Mono.fromCallable(backendService::doSomething)
    .transformDeferred(CircuitBreakerOperator.of(circuitBreaker))
ℹ️
Resilience4j also provides Reactor operators for RateLimiter, Bulkhead, TimeLimiter and Retry. Find out more in our User Guide.

6.2. RateLimiter

The following example shows how to restrict the calling rate of some method to be not higher than 1 request/second.

// Create a custom RateLimiter configuration
RateLimiterConfig config = RateLimiterConfig.custom()
    .timeoutDuration(Duration.ofMillis(100))
    .limitRefreshPeriod(Duration.ofSeconds(1))
    .limitForPeriod(1)
    .build();
// Create a RateLimiter
RateLimiter rateLimiter = RateLimiter.of("backendName", config);

// Decorate your call to BackendService.doSomething()
Supplier<String> restrictedSupplier = RateLimiter
    .decorateSupplier(rateLimiter, backendService::doSomething);

// First call is successful
Try<String> firstTry = Try.ofSupplier(restrictedSupplier);
assertThat(firstTry.isSuccess()).isTrue();

// Second call fails, because the call was not permitted
Try<String> secondTry = Try.of(restrictedSupplier);
assertThat(secondTry.isFailure()).isTrue();
assertThat(secondTry.getCause()).isInstanceOf(RequestNotPermitted.class);

6.3. Bulkhead

There are two isolation strategies and bulkhead implementations.

6.3.1. SemaphoreBulkhead

The following example shows how to decorate a lambda expression with a Bulkhead. A Bulkhead can be used to limit the amount of parallel executions. This bulkhead abstraction should work well across a variety of threading and io models. It is based on a semaphore, and unlike Hystrix, does not provide "shadow" thread pool option.

// Create a custom Bulkhead configuration
BulkheadConfig config = BulkheadConfig.custom()
    .maxConcurrentCalls(150)
    .maxWaitDuration(100)
    .build();

Bulkhead bulkhead = Bulkhead.of("backendName", config);

Supplier<String> supplier = Bulkhead
    .decorateSupplier(bulkhead, backendService::doSomething);

6.3.2. ThreadPoolBulkhead

The following example shows how to use a lambda expression with a ThreadPoolBulkhead which uses a bounded queue and a fixed thread pool.

// Create a custom ThreadPoolBulkhead configuration
ThreadPoolBulkheadConfig config = ThreadPoolBulkheadConfig.custom()
    .maxThreadPoolSize(10)
    .coreThreadPoolSize(2)
    .queueCapacity(20)
    .build();

ThreadPoolBulkhead bulkhead = ThreadPoolBulkhead.of("backendName", config);

// Decorate or execute immediately a lambda expression with a ThreadPoolBulkhead.
Supplier<CompletionStage<String>> supplier = ThreadPoolBulkhead
    .decorateSupplier(bulkhead, backendService::doSomething);

CompletionStage<String> execution = bulkhead
    .executeSupplier(backendService::doSomething);

7. Consume emitted events

CircuitBreaker, RateLimiter, Cache, Bulkhead, TimeLimiter and Retry components emit a stream of events. It can be consumed for logging, assertions and any other purpose.

7.1. Examples

A CircuitBreakerEvent can be a state transition, a circuit breaker reset, a successful call, a recorded error or an ignored error. All events contains additional information like event creation time and processing duration of the call. If you want to consume events, you have to register an event consumer.

circuitBreaker.getEventPublisher()
    .onSuccess(event -> logger.info(...))
    .onError(event -> logger.info(...))
    .onIgnoredError(event -> logger.info(...))
    .onReset(event -> logger.info(...))
    .onStateTransition(event -> logger.info(...));
// Or if you want to register a consumer listening to all events, you can do:
circuitBreaker.getEventPublisher()
    .onEvent(event -> logger.info(...));

You can use RxJava or Spring Reactor Adapters to convert the EventPublisher into a Reactive Stream. The advantage of a Reactive Stream is that you can use RxJava’s observeOn operator to specify a different Scheduler that the CircuitBreaker will use to send notifications to its observers/consumers.

RxJava2Adapter.toFlowable(circuitBreaker.getEventPublisher())
    .filter(event -> event.getEventType() == Type.ERROR)
    .cast(CircuitBreakerOnErrorEvent.class)
    .subscribe(event -> logger.info(...))
ℹ️
You can also consume events from other components. Find out more in our User Guide.

8. Talks

0:34

Battle of the Circuit Breakers: Resilience4J vs Istio

Nicolas Frankel

GOTO Berlin

0:33

Battle of the Circuit Breakers: Istio vs. Hystrix/Resilience4J

Nicolas Frankel

JFuture

0:42

Resilience patterns in the post-Hystrix world

Tomasz Skowroński

Cloud Native Warsaw

0:52

Building Robust and Resilient Apps Using Spring Boot and Resilience4j

David Caron

SpringOne

0:22

Hystrix is dead, now what?

Tomasz Skowroński

DevoxxPL

9. Companies that use Resilience4j

  • Deutsche Telekom (In an application with over 400 million requests per day)

  • AOL (In an application with low latency requirements)

  • Netpulse (In a system with 40+ integrations)

  • wescale.de (In a B2B integration platform)

  • Topia (In an HR application built with microservices architecture)

  • Auto Trader Group plc (The largest Britain digital automotive marketplace)

  • PlayStation Network (A platform backend)

10. License

Copyright 2020 Robert Winkler, Bohdan Storozhuk, Mahmoud Romeh, Dan Maas and others

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Comments
  • Allow circuitbreakers to be enabled and disabled via CircuitBreakerConfig

    Allow circuitbreakers to be enabled and disabled via CircuitBreakerConfig

    This would be helpful for being able to bypass a circuitbreaker without making code changes. We could then just make config changes to drive the behavior.

    @RobWin thoughts?

    enhancement 
    opened by drmaas 49
  • Micronaut Support for Resilience4j

    Micronaut Support for Resilience4j

    there is a task in the micronaut repo for adding support micronaut support to resilience4j: https://github.com/micronaut-projects/micronaut-core/issues/965

    This is a bit of a mess but I'll clean this up as I get closer to a final implementation.

    here is some wip work that I've been working on to add support. Some of the methods in the factory classes are pretty close to their spring counterparts. not sure If I will have to tweak them but the implementation is pretty close between the two. I'm a little stuck with building out the interceptor methods for micronaut-aop and I'll have to put together some tests to verify If I implemented this correctly.

    opened by pollend 44
  • Support for extending Micrometer tags

    Support for extending Micrometer tags

    I want to be able to extend the tags added to a gauge in the micrometer library.

    But currently all classes responsible for metrics tags have a private constructor and thus cannot be easily extended.

    • TaggedRetryMetrics
    • TaggedCirciutBreakerMetrics
    • TaggedBulkheadMetrics
    • TaggedRateLimiterMetrics

    Could you make the classes extendable or add a way I could provide the bean as in RetryMetricsAutoConfiguration myself that is not a closed class?

    Thanks!

    enhancement implemented 
    opened by batigoal82 44
  • CircuitBreaker record a failure when a certain result is returned

    CircuitBreaker record a failure when a certain result is returned

    Retry allows check the result of a call and retry a call when a configurable predicate is true. It would be nice if the CircuitBreaker allows it as well. CircuitBreakerConfig should allow to configure a result predicate.

    enhancement implemented 
    opened by RobWin 42
  • Proposal: resilience4j-micrometer integration should use tags

    Proposal: resilience4j-micrometer integration should use tags

    Context

    Micrometer regards dimensions as a first-class citizen of time series and advises to not include them in the time series name (see https://micrometer.io/docs/concepts#_meters).

    resilience4j-micrometer adds the name of CircuitBreakers (or Bulkheads, Retries and RateLimits for that matter) to the metric time series. This leads to limitations for querying (e.g. "find me all the open circuit breakers" would not be possible) and a large number of series being published (e.g. 6x #circuitbreakers) which is not optimal for most time series databases.

    Proposal

    With this issue I propose to use tags for dimensions for all the Metrics currently supported (CircuitBreaker, RateLimit, Bulkhead, Retry).

    Consequences

    The implementation changes would be trivial (see Gauge Fluent Builder) but would result in backward incompatible change in structure and names of time series. I am not sure if this is ok or if we should add this as a non-default option. I would be able to contribute a PR if we get agreement on an option.

    Example

    I use CircuitBreaker as an example here as it has the most complex structure of the four.

    Current state

    In Prometheus, this is what you get by default (cb1 being the circuitbreaker name, only showing one metric):

    # HELP resilience4j_circuitbreaker_cb1_successful  
    # TYPE resilience4j_circuitbreaker_cb1_successful gauge
    resilience4j_circuitbreaker_cb1_successful 0.0
    

    Proposed state: tags for names and metrics

    To make discovery and drilldown easier, name and metric should be added as a dimension. This would allow drilldown on one specific circuitbreaker:

    # HELP resilience4j_circuitbreaker  
    # TYPE resilience4j_circuitbreaker gauge
    resilience4j_circuitbreaker_stats{name="cb1",metric="successful"} 0.0
    resilience4j_circuitbreaker_state{name="cb1"} 3.0
    

    This version would support queries like:

    • list of all open CircuitBreakers
    • overview of buffered calls across all CircuitBreakers
    • CircuitBreakers with more than 300 failed calls
    enhancement implemented 
    opened by noroute 42
  • Feature: Combine circuit breakers with TimeLimiter in Spring boot

    Feature: Combine circuit breakers with TimeLimiter in Spring boot

    This is a request for adding a feature in resilience4j. The project could have integration between "CircuitBreaker" and "TimeLimiter" using annotation in Spring Boot project. Hystrix there is a configuration in @HystrixCommand that allows us to set timeout to desired operation.

    I understood that is possible configure CircuitBreaker and TimeLimiter only using expression.

    enhancement 
    opened by charlesardsilva 37
  • Implementing Resilience4j for spring boot 2

    Implementing Resilience4j for spring boot 2

    Thanks for raising a Resilience4j issue. Please provide a brief description of your problem along with the versions you are using. If possible, please also consider putting together a complete JUnit test that reproduces the issue.

    Resilience4j version:1.1.0

    Java version:8

    Problem description: I tried implementing circuit breaker using resilience4j and it was working fine. My requirement is that it should go to fall back method only when there are 5 errors/min. Is that possible in resilience4j?. Please provide a detailedsolution.

    opened by ramsirish 36
  • Timeout Decorator

    Timeout Decorator

    This pull request is for Enhancement #67

    Adds a decorator on some Supplier, Function, Runnable, Consumer, and Callable in and wraps the function in a single threaded executed Future with a timeout specified in the TimeoutConfig.

    Upon Concurrent TimeoutException, ExecutableException, InterruptedException, wraps checked exception in a RuntimeException resilience4j.timeout.TimeoutException with cause being the checked exception.

    Example Usage:

     // Default Config
    Timeout timeout = Timeout.ofDefault();
    CheckedRunnable timedRun = Timeout.decorateCheckedRunnable(timeout, this::doSomething);
    
    // Custom Config
    TimeoutConfig timeoutConig = TimeoutConfig.builder()
    	.timeoutDuration(Duration.ofMillis(10000))
            .cancelOnException(FALSE)
    	.build()
    Timeout timeout = Timeout.of(timeoutConfig);
    CheckedRunnable timedRun = Timeout.decorateCheckedRunnable(timeout, this::doSomething);
    
    // Or Default Config with specified Timeout
    Timeout timeout = Timeout.of(Duration.ofMillis(10000));
    CheckedRunnable timedRun = Timeout.decorateCheckedRunnable(timeout, this::doSomething);
    

    Note: It will wrap a functions Throwable in a Concurrent ExecutionException which will throw as a TimeoutException(ExecutionException(Throwable)). Not sure if this is the best approach.

    enhancement 
    opened by maarek 36
  • CircuitBreaker stuck in half open

    CircuitBreaker stuck in half open

    Resilience4j version: 1.2.0 Java version: 11.0.2 Micronaut version: 1.2.9 RELEASE

    We are using "TIME BASED" sliding window type. So when we are running load test, most of the time our pod is getting stuck in' half_open' state and not allowing any calls to backend. We observed that whenever pod gets stuck in half_open state, metric named resilience4j_circuitbreaker_buffered_calls{kind="failed",name="store-price",ready="true",} 8.0 doesn't refresh with the new values and continue to retain the same number which in return I suspect does not trigger the calculation of the error rate in half open state. Observation is buffered calls gets stuck at a number less than the number of minimum call. These are the configuration we have for Time Based sliding window: failure-rate-threshold: 25 wait-duration-in-open-state: 10s
    sliding-window-type: TIME_BASED sliding-window-size: 1 minimum-number-of-calls: 10 wait-duration-in-open-state: 1000ms permitted-number-of-calls-in-half-open-state: 10

    It’s the same behavior when we switched to the count_based configuration. Below is the configuration we have used. failure-rate-threshold": "100", sliding-window-type": "COUNT_BASED", sliding-window-size": "100", minimum-number-of-calls": "100", wait-duration-in-open-state": "10s", permitted-number-of-calls-in-half-open-state": "10"

    Appreciate any help !!!

    needs investigation 
    opened by f2014440 35
  • Problem with metrics end points

    Problem with metrics end points

    Resilience4j version: 1.4.0

    Java version: 11

    hello! i have a problem with the end points for metrics, for me doesn't work these 3 end points

    /actuator/circuitbreakerevents /actuator/metrics /actuator/prometheus

    My config

    implementation "org.springframework.boot:spring-boot-starter-actuator"
     ...
    implementation ("io.github.resilience4j:resilience4j-spring-boot2:1.4.0")
    implementation ("org.springframework.boot:spring-boot-starter-aop")
    implementation ("io.micrometer:micrometer-registry-prometheus")
    

    Do you need an extra configuration?

    Best regards

    question 
    opened by esteve8 34
  • how Resilience4J cleans up circuitBreaker objects in memory

    how Resilience4J cleans up circuitBreaker objects in memory

    I am working on an aggregator project that calls more than hundreds of external Apis to build the response. I am creating circuitBreaker instance per url and ended up creating lots of circuitBreaker instances. Though few circuitBreaker instances are rarely used, it is still occupying memory. Is there a way we can improve memory usage and do some cleanup by garbage collecting those rarely used objects and if a request comes later then Resilence4j anyways gets or creates an instance.

    enhancement 
    opened by KrnSaurabh 34
  • Bump actions/checkout from 3.2.0 to 3.3.0

    Bump actions/checkout from 3.2.0 to 3.3.0

    Bumps actions/checkout from 3.2.0 to 3.3.0.

    Release notes

    Sourced from actions/checkout's releases.

    v3.3.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/checkout/compare/v3.2.0...v3.3.0

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 0
  • circuitbreaker_calls metrics show always zero, whereas circuitbreaker_buffered metrics show meaningful numbers

    circuitbreaker_calls metrics show always zero, whereas circuitbreaker_buffered metrics show meaningful numbers

    Resilience4j version: 1.7.1

    Java version: 18

    Thanks for raising a Resilience4j issue.

    Hi all,

    as the title suggests we face a weird behaviour, maybe someone has an idea, if not I'm happy to post some code later. The implementation uses a circuit breaker, timelimiter and retry. In order to track the application prometheus is used. Here following metrics show meaningful numbers:

    • resilience4j_circuitbreaker_buffered_calls
    • resilience4j_retry_calls
    • resilience4j_circuitbreaker_state

    In contrast to it folowing metrics show always zero:

    • resilience4j_circuitbreaker_calls_seconds_count
    • resilience4j_timelimiter_calls_total

    Which seems quite odd to me. Does anyone have an idea why this could occur? Usually its all or none broken/working right...?

    opened by pmcpg 6
  • Bump org.jetbrains.kotlin.jvm from 1.7.22 to 1.8.0

    Bump org.jetbrains.kotlin.jvm from 1.7.22 to 1.8.0

    Bumps org.jetbrains.kotlin.jvm from 1.7.22 to 1.8.0.

    Release notes

    Sourced from org.jetbrains.kotlin.jvm's releases.

    Kotlin 1.8.0

    Changelog

    Analysis API

    • KT-50255 Analysis API: Implement standalone mode for the Analysis API

    Analysis API. FIR

    • KT-54292 Symbol Light classes: implement PsiVariable.computeConstantValue for light field
    • KT-54293 Analysis API: fix constructor symbol creation when its accessed via type alias

    Android

    • KT-53342 TCS: New AndroidSourceSet layout for multiplatform
    • KT-53013 Increase AGP compile version in KGP to 4.1.3
    • KT-54013 Report error when using deprecated Kotlin Android Extensions compiler plugin
    • KT-53709 MPP, Android SSL2: Conflicting warnings for androidTest/kotlin source set folder

    Backend. Native. Debug

    • KT-53561 Invalid LLVM module: "inlinable function call in a function with debug info must have a !dbg location"

    Compiler

    New Features

    • KT-52817 Add @JvmSerializableLambda annotation to keep old behavior of non-invokedynamic lambdas
    • KT-54460 Implementation of non-local break and continue
    • KT-53916 Support Xcode 14 and new Objective-C frameworks in Kotlin/Native compiler
    • KT-32208 Generate method annotations into bytecode for suspend lambdas (on invokeSuspend)
    • KT-53438 Introduce a way to get SourceDebugExtension attribute value via JVMTI for profiler and coverage

    Performance Improvements

    • KT-53347 Get rid of excess allocations in parser
    • KT-53689 JVM: Optimize equality on class literals
    • KT-53119 Improve String Concatenation Lowering

    Fixes

    • KT-53465 Unnecessary checkcast to array of reified type is not optimized since Kotlin 1.6.20
    • KT-49658 NI: False negative TYPE_MISMATCH on nullable type with when
    • KT-48162 NON_VARARG_SPREAD isn't reported on *toTypedArray() call
    • KT-43493 NI: False negative: no compilation error "Operator '==' cannot be applied to 'Long' and 'Int'" is reported in builder inference lambdas
    • KT-54393 Change in behavior from 1.7.10 to 1.7.20 for java field override.
    • KT-55357 IllegalStateException when reading a class that delegates to a Java class with a definitely-not-null type with a flexible upper bound
    • KT-55068 Kotlin Gradle DSL: No mapping for symbol: VALUE_PARAMETER SCRIPT_IMPLICIT_RECEIVER on JVM IR backend
    • KT-51284 SAM conversion doesn't work if method has context receivers
    • KT-48532 Remove old JVM backend

    ... (truncated)

    Changelog

    Sourced from org.jetbrains.kotlin.jvm's changelog.

    1.8.0

    Analysis API

    • KT-50255 Analysis API: Implement standalone mode for the Analysis API

    Analysis API. FIR

    • KT-54292 Symbol Light classes: implement PsiVariable.computeConstantValue for light field
    • KT-54293 Analysis API: fix constructor symbol creation when its accessed via type alias

    Android

    • KT-53342 TCS: New AndroidSourceSet layout for multiplatform
    • KT-53013 Increase AGP compile version in KGP to 4.1.3
    • KT-54013 Report error when using deprecated Kotlin Android Extensions compiler plugin
    • KT-53709 MPP, Android SSL2: Conflicting warnings for androidTest/kotlin source set folder

    Backend. Native. Debug

    • KT-53561 Invalid LLVM module: "inlinable function call in a function with debug info must have a !dbg location"

    Compiler

    New Features

    • KT-52817 Add @JvmSerializableLambda annotation to keep old behavior of non-invokedynamic lambdas
    • KT-54460 Implementation of non-local break and continue
    • KT-53916 Support Xcode 14 and new Objective-C frameworks in Kotlin/Native compiler
    • KT-32208 Generate method annotations into bytecode for suspend lambdas (on invokeSuspend)
    • KT-53438 Introduce a way to get SourceDebugExtension attribute value via JVMTI for profiler and coverage

    Performance Improvements

    • KT-53347 Get rid of excess allocations in parser
    • KT-53689 JVM: Optimize equality on class literals
    • KT-53119 Improve String Concatenation Lowering

    Fixes

    • KT-53465 Unnecessary checkcast to array of reified type is not optimized since Kotlin 1.6.20
    • KT-49658 NI: False negative TYPE_MISMATCH on nullable type with when
    • KT-48162 NON_VARARG_SPREAD isn't reported on *toTypedArray() call
    • KT-43493 NI: False negative: no compilation error "Operator '==' cannot be applied to 'Long' and 'Int'" is reported in builder inference lambdas
    • KT-54393 Change in behavior from 1.7.10 to 1.7.20 for java field override.
    • KT-55357 IllegalStateException when reading a class that delegates to a Java class with a definitely-not-null type with a flexible upper bound
    • KT-55068 Kotlin Gradle DSL: No mapping for symbol: VALUE_PARAMETER SCRIPT_IMPLICIT_RECEIVER on JVM IR backend
    • KT-51284 SAM conversion doesn't work if method has context receivers
    • KT-48532 Remove old JVM backend
    • KT-55065 Kotlin Gradle DSL: Reflection cannot find class data for lambda, produced by JVM IR backend

    ... (truncated)

    Commits
    • da1a843 Add ChangeLog for 1.8.0-RC2
    • d325cf8 Call additional publishToMavenLocal in maven build scripts and enable info
    • 0403d70 Don't leave Gradle daemons after build scripts
    • 52b225d Fix task module-name is not propagated to compiler arguments
    • d40ebc3 Specify versions-maven-plugin version explicitly
    • 2e829ed Fix version parsing crash on Gradle rich version string
    • f603c0e Scripting, IR: fix capturing of implicit receiver
    • 06cbf8f Scripting, tests: enable custom script tests with IR
    • d61cef0 Fix deserialization exception for DNN types from Java
    • ea33e72 JVM IR: script is a valid container for local delegated properties
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies java 
    opened by dependabot[bot] 0
  • Resilence 4j timelimiter , future with custom executor and integration for fallback method

    Resilence 4j timelimiter , future with custom executor and integration for fallback method

    Resilience4j version: 1.7.1 Java version: 11

    Hi @RobWin

    I was going through previous articles on ( #https://github.com/resilience4j/resilience4j/issues/497) resilience4j unable to cancel completableFuture.

    But found out that Future can be cancelled but again @TImeLimiter annotation does not support Future, so we need to go for Functional declaration for TimeLimiter.

    I wanted to achieve the below

    • Need to pass custom executor where thread pool count can be controlled.
    • Need to hook fallback method through this approach.

    Sample Code

    private TimeLimiter elasticTimeLimiter = TimeLimiter.of(TimeLimiterConfig.custom()
                                                        .timeoutDuration(Duration.ofMillis(450))
                                                        .cancelRunningFuture(true)
                                                        .build());
    
    public Callable<String> getResponse(){
                return TimeLimiter.decorateFutureSupplier(elasticTimeLimiter, () ->
                                CompletableFuture.supplyAsync(() -> service.getResponse()));
    }
    

    Is there any working code that I can refer to ?

    opened by kaintharinder 0
  • Bump actions/cache from 3.0.11 to 3.2.2

    Bump actions/cache from 3.0.11 to 3.2.2

    Bumps actions/cache from 3.0.11 to 3.2.2.

    Release notes

    Sourced from actions/cache's releases.

    v3.2.2

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/cache/compare/v3.2.1...v3.2.2

    v3.2.1

    What's Changed

    Full Changelog: https://github.com/actions/cache/compare/v3.2.0...v3.2.1

    v3.2.0

    What's Changed

    New Contributors

    ... (truncated)

    Changelog

    Sourced from actions/cache's changelog.

    3.0.11

    • Update toolkit version to 3.0.5 to include @actions/core@^1.10.0
    • Update @actions/cache to use updated saveState and setOutput functions from @actions/core@^1.10.0

    3.1.0-beta.1

    • Update @actions/cache on windows to use gnu tar and zstd by default and fallback to bsdtar and zstd if gnu tar is not available. (issue)

    3.1.0-beta.2

    • Added support for fallback to gzip to restore old caches on windows.

    3.1.0-beta.3

    • Bug fixes for bsdtar fallback if gnutar not available and gzip fallback if cache saved using old cache action on windows.

    3.2.0-beta.1

    • Added two new actions - restore and save for granular control on cache.

    3.2.0

    • Released the two new actions - restore and save for granular control on cache

    3.2.1

    • Update @actions/cache on windows to use gnu tar and zstd by default and fallback to bsdtar and zstd if gnu tar is not available. (issue)
    • Added support for fallback to gzip to restore old caches on windows.
    • Added logs for cache version in case of a cache miss.

    3.2.2

    • Reverted the changes made in 3.2.1 to use gnu tar and zstd by default on windows.
    Commits
    • 4723a57 Revert compression changes related to windows but keep version logging (#1049)
    • d1507cc Merge pull request #1042 from me-and/correct-readme-re-windows
    • 3337563 Merge branch 'main' into correct-readme-re-windows
    • 60c7666 save/README.md: Fix typo in example (#1040)
    • b053f2b Fix formatting error in restore/README.md (#1044)
    • 501277c README.md: remove outdated Windows cache tip link
    • c1a5de8 Upgrade codeql to v2 (#1023)
    • 9b0be58 Release compression related changes for windows (#1039)
    • c17f4bf GA for granular cache (#1035)
    • ac25611 docs: fix an invalid link in workarounds.md (#929)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 0
  • Fall back method is not getting called

    Fall back method is not getting called

    Resilience4j version:2.0.0

    Java version:17 userservice.zip

    This service is being called via Spring Cloud Gateway

    Thanks for raising a Resilience4j issue. Please replace this text with a brief description of your problem along with the versions you are using. If possible, please also consider putting together a complete JUnit test that reproduces the issue.

    opened by vctrpal 1
Releases(v2.0.2)
  • v2.0.2(Dec 9, 2022)

  • v2.0.1(Dec 5, 2022)

    Enhancements

    • Support Spring Boot 3 by adding resilience4j-spring-boot3 and resilience4j-spring6

    • Issue #1787: Apply Spring Boot customizers even if there is no instance entry in the config file

    Bugs

    • Issue #1825: Aspectj must not be mandatory in Spring Boot modules

    • Issue #1809: Fixed concurrency issue in Cache module

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Nov 21, 2022)

  • v1.7.1(Jun 25, 2021)

    Enhancements

    • Issue #1414: SpEL expressions support passing runtime method arguments to bean methods

    Bugs

    • Issue #1268: Stream events from springboot2 stopped SSE after the 1st message.
    • Issue #1372: Kotlin Timelimiter executeSuspendFunction throws TimeoutException after coroutine is canceled
    • Issue #1432: CircuitBreaker permits more calls then expected when switching from OPEN to HALF_OPEN state
    • Issue #1437: Event can be published twice when CircuitBreaker in MetricsOnlyState
    Source code(tar.gz)
    Source code(zip)
  • v1.7.0(Jan 21, 2021)

    Enhancements

    • RateLimiter: Reduce RateLimiter memory footprint of high cardinality keys #1221
    • CircuitBreaker: When waitDurationInOpenState and waitIntervalFunctionInOpenStat are used together, waitDurationInOpenState will be overridden #1214
    • TimeLimiterAspect does not refresh static timeLimiterExecutorService on Spring context shutdown and restart #1203
    • CircuitBreaker: Record a failure on result #384
    • Added support for Micronaut
    • Updated Spring Boot from 2.3.0.RELEASE to 2.4.1
    • Updated Reactor from 3.3.0.RELEASE to 3.4.0
    • Updated Spring Cloud Context from 2.2.2.RELEASE to 3.0.0
    • Updated Spring Framework from 5.2.6.RELEASE to 5.3.2
    • Updated Spring Boot Open Feign from 2.2.2.RELEASE to 2.2.6.RELEASE
    • Updated Kotlin Coroutines from 1.3.2 to 1.4.2
    • Updated Dropwizard Metrics from 3.2.6 to 4.1.16
    • Prevent the decoration of default methods in feign client #1245
    • Added RateLimiter.drainPermissions method #1240
    • Added failAfterMaxAttempts flag to RetryConfig and a new MaxRetriesExceededException #1293

    Bugs

    • NullPointerException requesting actuator metrics for retries using retryOnResult #1205
    • CircuitBreakers events endpoint doesn't work after replacing instances at runtime #1116
    Source code(tar.gz)
    Source code(zip)
  • v1.6.1(Oct 19, 2020)

  • v1.6.0(Oct 6, 2020)

    Enhancements

    • RetryConfig.DEFAULT_MAX_ATTEMPTS should be public #1180
    • Circuitbreaker doesn't open when nested TimeLimiter throws TimeOutCancellationException #1123
    • Enhance Server Side Events /circuitbreaker/events #1076
    • CallNotPermittedException should contain circuit breaker name (and possibly other information) #1062
    • Retry: Exponential backoff with constant behaviour after certain time #1044
    • Respecting the clock set in the CircuitBreakerStateMachine for detecting slow calls #734

    Bugs

    • Circuit breaker stuck in HALF_OPEN state #935
    • Circuit breaker global fallback seems to not work when annotated method has more than 1 parameter #1174
    • Timelimiter metrics not calculated when using resilince4j-kotlin #1168
    • Problem with registering metrics for more than one circuit breaker #1131
    • ConcurrentModificationException warning log while consuming events #1115
    • CircuitBreakerConfig.Builder.waitDurationInOpenState() false documentation of when the function throws exception #1092
    Source code(tar.gz)
    Source code(zip)
  • v1.5.0(Jun 3, 2020)

    • Issue #855: Updated resilience4j-spring-boot2 to 2.3.0.RELEASE
    • Issue #855: Updated resilience4j-spring-cloud2 to 2.2.2.RELEASE
    • Issue #942: Introduced new CB metric "notPermittedCalls"
    • Issue #964: Added Kotlin DSL for building *Config and *Registry classes
    • Issue #979: Added fairCallHandlingEnabled flag to BulkheadConfig which controls whether FairSync or NonfairSync should be used in the Semaphore.
    • Issue #982: Added support to configure exponential random backoff via Spring config
    • Issue #991: Fixed bug that auto transition to half_open happens even if the state is forced open.
    • Issue #1000: Added toString to CircuitBreakerConfig
    • Issue #1003: Fixed bug that CircuitBreaker tries to obtain permission twice in circuitBreaker.decorateEitherSupplier()
    Source code(tar.gz)
    Source code(zip)
  • v1.4.0(Apr 22, 2020)

    • Issue #703: Add a feature that allows to plug-in your own Registry implementation which can be based on a cache library if needed.
    • Issue #737: Updated reactor version to 3.3.0.RELEASE
    • Issue #933: Add RegistryStore and builder methods to create BulkheadRegistry and ThreadPoolBulkheadRegistry
    • Issue #924: Add RegistryStore and builder methods to create RetryRegistry
    • Issue #910: Add RegistryStore and builder methods to create RateLimiterRegistry
    • Issue #928: Fix TimeLimiter does not set a message for TimeoutException
    • Issue #916: Allow setting Retry Wait Duration Limit to value equal >= zero
    • Issue #887: Fixing Spring Boot Common and Spring Boot 2 modules share the same packages which is not allowed in the Java Module system
    • Issue #886: Add support for RxJava 3
    • Issue #913: Add proper graceful cleanup of resilience4j thread pool executors which make it properly cleaned on spring boot applications
    • Issue #939: Fix actuator shows Whitelabel error page with "Invalid Event"
    • Issue #958: Added missing method to set contextProgagators in ThreadPoolBulkheadConfigurationProperties
    • PR #914: Adding non-coroutine kotlin wrapper functions as a convenience
    • PR #943: Removed deprecated documentation
    Source code(tar.gz)
    Source code(zip)
  • v1.3.1(Feb 6, 2020)

    • Issue #596: Fixed a bug: The fallback method is not invoked when using CompletableFutures and a ThreadPoolBulkhead annotation in Spring Boot
    Source code(tar.gz)
    Source code(zip)
  • v1.3.0(Feb 5, 2020)

    • Issue #822: Fixed the case where resilience4j rateLimiter seems to ignore configuration
    • Issue #816: Fixed Reactor RetryOperator throws exception wrapped by RetryExceptionWrapper
    • Issue #806: Switched aggregated retry.calls metric to a counter from a gauage
    • Issue #803: Added new Circuit breaker state -> METRICS_ONLY
    • Issue #799: Fixed WritableStackTraceEnabled config setting in ThreadPool bulkhead configuration
    • Issue #775: Added Getter for RetryOnRetryEvent
    • Issue #769: Fixed Duplicated auto complete support in IDEA
    • Issue #765: Added support to use Retry with Feign client
    • Issue #751: Vavr upgrade to 0.10.2
    • Issue #718: Fixed blocking behavior in Reactor Retry Operator
    • Issue #711: Added support to use SpEL in resilienec4j spring annoations
    • Issue #751: Fixed Resilience4j Spring boot modules MetricsAutoConfiguration
    • Issue #565: Added ThreadLocal passing support to the Threadpool bulkhead implementation
    • Issue #430: Added TimeLimiter spring boot starter support
    • Issue #509: Added support to extend Micrometer tags
    • PR #831: non backward compatible API change in ThreadPoolBulkhead decorateRunnable(ThreadPoolBulkhead bulkhead, Runnable runnable) now return Supplier<CompletionStage> instead of Runnable
    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Dec 2, 2019)

    • Issue #642: Added weight support in RateLimiter
    • Issue #659: Added support for Kotlin Flows
    • Issue #668: Added util class to determine whether Circuit Breaker permits calls
    • Issue #671: Allow configurable wait times for circuit breakers to be open as a function of # of close attempts
    • Issue #674: CircuitBreaker tried an illegal state transition from HALF_OPEN to HALF_OPEN
    • Issue #682: Retrofit call cancellations are recorded as circuit breaker failures
    • Issue #687: context.onSuccess called in case of maximum amount of retries reached
    • Issue #691: Exceptions thrown from fallback methods shouldn't be wrapped
    • Issue #699: Added CircuitBreaker waitIntervalFunction to spring boot config
    • Issue #701: Allow custom Prometheus Histogram buckets
    • Issue #756: Spring Boot module must work without a Spring actuator
    • PR #722: Health indicator overall status can be controlled with allowHealthIndicatorToFail property
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Sep 27, 2019)

    • Issue #235: Added a TimeLimiter operator to resilience4j-reactor and resilience4j-rxjava2

    • Issue #625: Fixed reliability and security issues raised by sonar

    • Issue #626: Handle thread interruption consistently in Bulkhead and RateLimiter blocking methods

    • Issue #634: Adapted resilience4j-metrics to latest changes in the CircuitBreaker

    • Issue #646: Fixed CircuitBreaker 'XX' tried an illegal state transition from OPEN to OPEN

    • Issue #607: Added a new config parameter to enable the CircuitBreaker and RateLimiter health indicator. They are disabled by default now.

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Sep 16, 2019)

    • Issue #607: Spring Boot HealthIndicators are by default disabled now
    • Issue #546: Added support for Spring Cloud Config
    • Issue #581: Enhancement in resilience4j-reactor and resilience4j-rxjava2 to better support the zip operator.
    • Issue #559: Added support for @FeignClient annotation
    • Issue #560: Fixed bug when using a lambda fallback in Feign
    • Issue #547: Replaced the CircuitBreaker ring buffer implementation by a count-based and time-based sliding window implementation
    • Issue #562: Fixed bug: Illegal state transition from CLOSED to HALF_OPEN
    • Issue #568: Allow to configure exceptions which should be treated as a success in the CircuitBreaker.
    • Issue #381: Allow to configure a slow response time threshold. If too many slow calls are recorded the CircuitBreaker opens.
    • Issue #488: Micrometer support for ThreadPoolBulkhead
    • Issue #540: Fixed a bug where IDE did not recognize the auto config properties
    Source code(tar.gz)
    Source code(zip)
  • v0.17.0(Jul 22, 2019)

    • Removed all deprecated methods in preparation for v1.0.0
    • Issue #500: Fiex bug where default external configs in Ratpack apps are not honored
    • Issue #506: Fixed bug where resilience4j-ratpack fails to run when Dropwizard metrics in not on classpath
    • Issue #515: Added Aspect ordering feature in resilience4j-spring again
    • Issue #518: Added support for Vavr Try and Either return types
    • Issue #538: Removed minimum waitDuration constraint for retry
    • Issue #544: Fixed bug where CircuitBreaker gets stuck in HALF_OPEN when the last test request throws an ignored exception
    • Issue #530: Improved RxJava2OnClasspathCondition and ReactorOnClasspathCondition
    Source code(tar.gz)
    Source code(zip)
  • v0.16.0(Jun 14, 2019)

    • Added a new resilience4j-kotlin module to support the decoration of suspend functions.

    • Issue #325: Added instance methods to decorate functions with a CircuitBreaker

    • Issue #431: Don’t prevent using other call adapters in CircuitBreakerCallAdapter

    • Issue #458: Fixed a bug where the reactor context was not available when using circuit breaker

    • Issue #469: Fixed a bug that registerHealthIndicator defined in a default config is not inherited

    • Issue #480: Fixed a bug in the decoration of a CompletionStage, if it’s a Runnable which is executed async

    • Issue #486: Added bulkhead configs to resilience4j-ratpack

    • Issue #489: Set the proper order of spring aspects to make thread pool spring aspect work properly

    • PR #478: Added a find() method to all registries

    Source code(tar.gz)
    Source code(zip)
  • v0.15.0(May 18, 2019)

    • Issue #309: Added fallbackMethod support to annotations for Spring and Ratpack

    • Issue #268: Added a functionality to add configurations to registries and reuse them.

    • Issue #398: Added an event publisher to all registries which allows to execute code when entries are created, deleted or replaced.

    • Issue #273: Added a remove method to all registries

    • Issue #282: Added a replace method to all registries

    • Issue #291: Added support to overwrite all resilience4j beans in Spring Boot.

    • Issue #417: Allow to fully close a bulkhead

    • Issue #311, #336, #357, #361: Refactored resilience4j-reactor and resilience4j-rxJava2 so that they try to acquire a permission before the subscriptions happens.

    • Issue #343: CircuitBreaker only allows a configurable number of concurrent calls when in half-open state and rejects all further calls.

    Source code(tar.gz)
    Source code(zip)
  • v0.14.1(Apr 5, 2019)

  • v0.14.0(Apr 5, 2019)

    • Issue #196: Added a new resilience4j-feign module
    • Issue #241: Added support to configure automaticTransitionFromOpenToHalfOpenEnabled in Spring Boot
    • Issue #248: Support The Use Of @CircuitBreaker on methods that return a mono Or flux
    • 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
    Source code(tar.gz)
    Source code(zip)
  • v0.13.2(Nov 18, 2018)

    • PR #244: Corrected link to Prometheus Metrics Integration

    • PR #246: Make async retrofit call not make the request when circuit is open

    • PR #248: Removed rxjava2 dependency for time limiter

    • PR #253: Fixed documentation

    • PR #254: Additional factory methods for Micrometer CircuitBreakerMetrics

    • PR #271: Remove deprecated usage of Mockito Matchers

    • PR #276: Add response predicate to retry sync and async for enhancement

    • PR #277: Generate BOM for resilience4j

    • PR #281: Avoid creating unnecessary logging strings

    • PR #284: Avoiding calling bulkheadConfigSupplier needlessly

    • Issue #245; PR #260: Fix CircuitBreakerSubscriber for Reactor doesn’t count successes when using Mono/Flux.toFuture()

    • Issue #263; PR #264: Fix bulkhead on Single and Maybe

    Source code(tar.gz)
    Source code(zip)
  • v0.13.1(Jul 9, 2018)

  • v0.13.0(Jun 18, 2018)

    • PR #216: Added Circuit Breaker option to auto transition to half open
    • PR #217: Added ignoreExceptions() and recordExceptions() to CircuitBreakerConfig.Builder
    • PR #226: Ratpack does no longer depend on Dropwizard or Prometheus
    • PR #227: Ratpack module uses Spring Reactor now
    • PR #229: Publish retry event for every retry
    • PR #231: Added validation to Spring Boot CircuitBreakerProperties
    • PR #234: Non-blocking API for RateLimiter
    • PR #236: Added Spring 4, Spring Boot 1 and Spring Boot 2 modules
    Source code(tar.gz)
    Source code(zip)
  • v0.12.1(Mar 15, 2018)

  • v0.12.0(Mar 13, 2018)

    • PR #188: Added reset method to Circuit Breaker

    • PR #194: Added disable and force_open states to Circuit Breaker

    • PR #205: Added Reactor support for circuit breaker, bulkhead and rate limiter.

    • PR #206: Added support for Micrometer

    • PR #208: Updated Retrofit version from 2.1 to 2.3

    • PR #211: Make sure the Reactor operators can be used together on a Flux

    • Updated Vavr from 0.9.1 to 0.9.2

    • Updated RxJava from 2.1.3 to 2.1.10

    • Updated Vertx from 3.4.1 to 3.5.1

    • Updated Dropwizard Metrics from 3.1.2 to 3.2.5

    • Updated Spring Boot from 1.4.3.RELEASE to 1.5.5.RELEASE

    • Updated Ratpack from 1.4.6 to 1.5.4

    • Updated Prometheus from 0.0.21 to 0.3.0

    • Issue #47: OSGI Support. Fixed bnd configuration in publishing.gradle

    Source code(tar.gz)
    Source code(zip)
  • v0.11.0(Dec 15, 2017)

    • RP #164 Additional gauges to monitor the circuit breaker state

    • PR #165 Allow explicit ordering for CircuitBreaker and RateLimiter aspects in SpringBoot starter

    • PR #166 Bulkhead metrics for Dropwizard metrics module

    • PR #176 Retrofit enqueue support for circuit breaker and rate limiter

    • PR #177 Dynamic rate limiter configuration

    • PR #181 RxJava bulkhead operator for Maybe and Completable

    • PR #169 Bulkhead integration with Ratpack and call finished metric for bulkhead

    • PR #184 Dynamic bulkhead configuration

    • Issue #182 Fix for circuit breaker show only first state values in Dropwizard metrics

    Source code(tar.gz)
    Source code(zip)
  • v0.10.1(Sep 18, 2017)

    • Issue #153: Fixed CircuitBreakerTransformer error messaging

    • Issue #161: Fixed Spring Boot Prometheus AutoConfiguration

    • Updated Vavr from 0.9.0 to 0.9.1

    • Updated RxJava from 2.1.0 to 2.1.3

    Source code(tar.gz)
    Source code(zip)
  • v0.10.0(Jun 6, 2017)

    • Issue #123: Autobuild Ratpack CircuitBreaker, Retry, RateLimiter registry from properties.
    • Issue #126: Created Ratpack CircuitBreaker, RateLimiter sse event streams.
    • Issue #139: Support CircuitBreaker failure rate threshold < 1.

    NOTE: Braking changes:

    • Issue #51: Removed RxJava2 dependency to make Resilience4j more lightweight. Added a RxJava2 module.
    • Issue #148: Created an EventPublisher which replaces the RxJava Event Stream.
    Source code(tar.gz)
    Source code(zip)
  • v0.9.0(May 15, 2017)

    Note Breaking changes:

    • PR #119 - changed API of CircuitBreaker interface.

    The groupId has been changed from io.github.robwin to io.github.resilience4j

    • PR #59: Project has been renamed to resilience4j and has been modularized.

    • PR #59: Renamed packages from io.github.robwin to io.github.resilience4j.

    • PR #76: Module for integration with Retrofit.

    • PR #82: Module for integration with Ratpack.

    • PR #80: Resilience4j metrics reporting with Dropwizard metrics.

    • PR #81: Resilience4j metrics reporting with Prometheus.

    • PR #103, #104, #101: Various improvements of rxJava integration.

    • PR #119: Zero allocation rate for CircuitBreaker when it has no event subscribers.

    • Issue #70: Module with Spring Boot starter.

    • Issue #61: Permissions aren’t available from the first cycle in AtomicRateLimiter.

    • Performance improvements of ConcurrentEvictingQueue

    Source code(tar.gz)
    Source code(zip)
  • v0.8.2(May 15, 2017)

    • Issue #43: Added a new higher-order function to decorate a method which returns a CompletableFuture.

    • Issue #49: Added execute methods to CircuitBreaker interface and Decorators builder. This makes it easier to decorate and call a function at once.

    • Updated rxjava from 2.0.3 to 2.0.6

    • Updated slf4j-api from 1.7.12 to 1.7.24

    Source code(tar.gz)
    Source code(zip)
  • v0.8.1(Jan 11, 2017)

    Issue #41: Added a method to the CircuitBreakerRegistry which returns a list of all managed CircuitBreaker instances

    Issue #42: Added a new EventConsumerRegistry which can be used to create and manage instances of EventConsumers.

    Source code(tar.gz)
    Source code(zip)
Owner
Resilience4j
Resilience4j
Fault tolerance and resilience patterns for the JVM

Failsafe Failsafe is a lightweight, zero-dependency library for handling failures in Java 8+, with a concise API for handling everyday use cases and t

Jonathan Halterman 3.9k Dec 29, 2022
A reactive Java framework for building fault-tolerant distributed systems

Atomix Website | Javadoc | Slack | Google Group A reactive Java framework for building fault-tolerant distributed systems Please see the website for f

Atomix 2.3k Dec 29, 2022
BitTorrent library and client with DHT, magnet links, encryption and more

Bt A full-featured BitTorrent implementation in Java 8 peer exchange | magnet links | DHT | encryption | LSD | private trackers | extended protocol |

Andrei Tomashpolskiy 2.1k Jan 2, 2023
Ribbon is a Inter Process Communication (remote procedure calls) library with built in software load balancers. The primary usage model involves REST calls with various serialization scheme support.

Ribbon Ribbon is a client side IPC library that is battle-tested in cloud. It provides the following features Load balancing Fault tolerance Multiple

Netflix, Inc. 4.4k Jan 4, 2023
Fibers, Channels and Actors for the JVM

Quasar Fibers, Channels and Actors for the JVM Getting started Add the following Maven/Gradle dependencies: Feature Artifact Core (required) co.parall

Parallel Universe 4.5k Dec 25, 2022
Zuul is a gateway service that provides dynamic routing, monitoring, resiliency, security, and more.

Zuul Zuul is an L7 application gateway that provides capabilities for dynamic routing, monitoring, resiliency, security, and more. Please view the wik

Netflix, Inc. 12.4k Jan 3, 2023
Build highly concurrent, distributed, and resilient message-driven applications on the JVM

Akka We believe that writing correct concurrent & distributed, resilient and elastic applications is too hard. Most of the time it's because we are us

Akka Project 12.6k Jan 3, 2023
Distributed Stream and Batch Processing

What is Jet Jet is an open-source, in-memory, distributed batch and stream processing engine. You can use it to process large volumes of real-time eve

hazelcast 1k Dec 31, 2022
a blockchain network simulator aimed at researching consensus algorithms for performance and security

Just Another Blockchain Simulator JABS - Just Another Blockchain Simulator. JABS is a blockchain network simulator aimed at researching consensus algo

null 49 Jan 1, 2023
Simple and lightweight sip server to create voice robots, based on vert.x

Overview Lightweight SIP application built on vert.x. It's intended to be used as addon for full-featured PBX to implement programmable voice scenario

Ivoice Technology 7 May 15, 2022
Apache Mesos is a cluster manager that provides efficient resource isolation and sharing across distributed applications, or frameworks

Apache Mesos is a cluster manager that provides efficient resource isolation and sharing across distributed applications, or frameworks. It can run Hadoop, Jenkins, Spark, Aurora, and other frameworks on a dynamically shared pool of nodes.

The Apache Software Foundation 5k Dec 31, 2022
How To Implement Fault Tolerance In Microservices Using Resilience4j

springboot-resilience4j-demo How To Implement Fault Tolerance In Microservices Using Resilience4j? Things todo list: Clone this repository: git clone

Hendi Santika 4 Mar 30, 2022
Netflix, Inc. 23.1k Jan 5, 2023
Fault tolerance and resilience patterns for the JVM

Failsafe Failsafe is a lightweight, zero-dependency library for handling failures in Java 8+, with a concise API for handling everyday use cases and t

Jonathan Halterman 3.9k Dec 29, 2022
Fault tolerance and resilience patterns for the JVM

Failsafe Failsafe is a lightweight, zero-dependency library for handling failures in Java 8+, with a concise API for handling everyday use cases and t

Jonathan Halterman 3.9k Jan 2, 2023
Fault tolerance and resilience patterns for the JVM

Failsafe Failsafe is a lightweight, zero-dependency library for handling failures in Java 8+, with a concise API for handling everyday use cases and t

Failsafe 3.9k Dec 29, 2022
:rocket: Lightning fast and elegant mvc framework for Java8

Based on Java8 + Netty4 to create a lightweight, high-performance, simple and elegant Web framework ?? Spend 1 hour to learn it to do something intere

Blade Framework 5.7k Dec 28, 2022