Questions tagged [resilience4j]

Resilience4j is lightweight alternative to Netflix Hystrix.

Resilience4j is a lightweight, easy-to-use fault tolerance library inspired by Netflix Hystrix, but designed for Java 8 and functional programming. Lightweight, because the library only uses Vavr (formerly Javaslang), 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. With Resilience4j you don’t have to go all-in, you can pick what you need.

Resilience provides several core modules and add-on modules:

Core modules:

resilience4j-circuitbreaker: Circuit breaking

resilience4j-ratelimiter: Rate limiting

resilience4j-bulkhead: Bulkheading

resilience4j-retry: Automatic retrying (sync and async)

resilience4j-cache: Response caching

resilience4j-timelimiter: Timeout handling

Add-on modules

resilience4j-metrics: Dropwizard Metrics exporter

resilience4j-prometheus: Prometheus Metrics exporter

resilience4j-spring-boot: Spring Boot Starter

resilience4j-ratpack: Ratpack Starter

resilience4j-retrofit: Retrofit Call Adapter Factories

resilience4j-vertx: Vertx Future decorator

resilience4j-consumer: Circular Buffer Event consumer
336 questions
14
votes
2 answers

Issue with io.github.resilience4j version 1.7.2 (SpelResolverConfigurationOnMissingBean.spelResolver() method that does not exist)

I'm using io.github.resilience4j. Everything is working fine with 1.6.1 version but when upgraded to 1.7.1 version my application is not running. Please find my code changes below. My pom.xml dependencies
Mahesh Yadav
  • 240
  • 2
  • 3
  • 13
9
votes
2 answers

Resilience4j vs Hystrix. What would be the best for fault tolerance?

When I initially learn about spring boot, I've learnt about spring cloud netflix hystrix as a circuit breaker. There were bunch of options such as multiple application properties and annotation base declarations for fault tolerance. In-addition to…
8
votes
1 answer

Resilience4j - Request timeout

I have a service which is using Hystrix circuit breaker pattern and it calls 3rd party service. With the help of @HystrixProperty(name = "execution.isolation.thread.timeoutInMilliseconds", value = "1000") I have defined the timeout for the 3rd…
Swapnil
  • 801
  • 3
  • 19
  • 42
7
votes
1 answer

Is it possible to have a circuit break for the database with Spring Boot?

Having a circuit breaker with Spring Boot for external calls (e.g. HTTP) is a common pattern that is rather easy to put into place, for example with resilience4j. I cannot find any information about doing the same with database calls, via…
cgf
  • 3,369
  • 7
  • 45
  • 65
7
votes
1 answer

How to create circuit breaker config from application.properties?

I have the following configuration with which I create circuit breakers at runtime: @Configuration public class CircuitBreakerConfiguration { public final static String DEFAULT_CIRCUIT_BREAKER_REGISTRY = "DEFAULT_CIRCUIT_BREAKER_REGISTRY"; …
Saif
  • 2,530
  • 3
  • 27
  • 45
7
votes
1 answer

Resilience4j on spring-boot2 - circuit breaker not opening

Following the getting started guide (https://resilience4j.readme.io/docs/getting-started-3) and the demo project (https://github.com/resilience4j/resilience4j-spring-boot2-demo) I wanted to test it by myself creating a simpler test application.…
user3727540
  • 922
  • 3
  • 11
  • 30
6
votes
1 answer

Difference between sliding window size and minimum number of calls

I am new to circuit breakers and have recently implemented them in one of my services. I was going through the documentation Resilience 4J official documentation and found two properties that we can configure for circuit…
6
votes
2 answers

How to create unit tests for methods annotated with @Circuitbreaker

I implemented resilience4j in my project using the Spring Boot2 starter (https://resilience4j.readme.io/docs/getting-started-3). I annotated a method with @CircuitBreaker that uses http client for calling an external service and the circuit breaker…
Eduardo Lima
  • 316
  • 1
  • 2
  • 10
6
votes
1 answer

spring boot actuator health endpoint + dynamic resilience4j circuit breakers

I have a spring boot app, which uses resilience4j AOP-based @CircuitBreakers. Now I would like to make the circuit breakers' information available in the /actuator/health endpoint, but I'm not seeing the details.circuitBtreakers objects described in…
derabbink
  • 2,419
  • 1
  • 22
  • 47
6
votes
1 answer

Alternative to Hystrix for Request Collapsing

as Netflix put Hystrix officially into maintenance mode (https://github.com/Netflix/Hystrix#hystrix-status), I started to look for alternatives. There are nice libraries like resilience4j when it comes to patterns like Circuit Breakers, Bulkheads,…
Benny
  • 1,435
  • 1
  • 15
  • 33
6
votes
2 answers

Resilience4j and Spring Actuator - Open circuit killing service

I have added the following dependency to my Spring Boot project implementation 'io.github.resilience4j:resilience4j-spring-boot2:0.14.1' When a circuit breaker opens, I get the following response on my actuator/health endpoint, with status code 503…
h1h1
  • 730
  • 4
  • 11
  • 19
5
votes
1 answer

What is the expected behavior of Resilience4J Retry?

I'm using Resilience4J in a Spring Boot project to make a call to a REST client like so: @Retry(name = "customerService") public Customer getCustomer(String customerNumber) { restTemplate.exchange("https://customer-service.net", HttpMethod.GET,…
5
votes
1 answer

Webflux WebClient retry and Spring Cloud Circuit Breaker Resilience4J Retry pattern walk into a bar

Would like to ask a question about two technologies. We first started with an application that has to call other third parties rest API, hence, we used the Webflux WebClient in our SpringBoot Webflux project. So far so good, we had a successful app…
PatPanda
  • 3,644
  • 9
  • 58
  • 154
5
votes
1 answer

Why use Circuit Breaker and Bulkhead when working with Spring Reactor?

Please help me find reasons why Circuit breaker and Bulkhead patterns are useful in a Spring Reactor application. Since operations will be non-blocking in Reactor and those two patterns aim at saving potential hit to resources (mostly threads), in…
LIvanov
  • 1,126
  • 12
  • 30
5
votes
2 answers

Call is not going to fallback method of Resilience4 Circuit breaker

I am using Resilience4j Circuit breaker version: '1.4.0 with Spring boot version 2.0.6 and my problem is - fallback method is not working. the call is not going to the fallback method. Below is my code…
vbvT
  • 71
  • 1
  • 8
1
2 3
22 23