How to use circuit breaker and retry annotations in reactive application ?
See original GitHub issueI would like to use Circuit Breaker and Retry in a micro-service architecture. My micro-services returns Mono objects, and I can’t find out an example to explain how to use Circuit Breaker and Retry in this.
@CircuitBreaker(name="ms")
@Retry(name="ms")
public Mono<Ms> getMs(){
return webClientBuilder.build().get()
.uri("http://load-balanced-ms/get-ms").retrieve().bodyToMono(Ms.class);
}
Can you help me ? Thanks a lot
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (10 by maintainers)
Top Results From Across the Web
Circuit Breaker And Retry with Spring Cloud Resiliance4j
Let's go to https://start.spring.io and create a simple spring boot application with the following dependencies. ... Along with the circuit- ...
Read more >Retry with Spring Boot and Resilience4j - Reflectoring
A deep dive into the Spring Boot Resilience4j Retry module, ... we'd use annotations @RateLimiter , @Bulkhead , @CircuitBreaker , etc.
Read more >Spring Cloud Circuit Breaker
Spring Retry provides declarative retry support for Spring applications. A subset of the project includes the ability to implement circuit breaker functionality ...
Read more >How To Integrate Circuit Breaker And Retry In A Spring Boot ...
In this video, we will be exploring how to integrate Resilience4J Circuit breaker and Retry mechanism in a Spring Boot Application.
Read more >Quick Guide to Spring Cloud Circuit Breaker - Baeldung
Let's create a web application using Spring Boot to allow us to explore how the Spring Cloud Circuit Breaker library works. We'll build...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you! @RobWin You save my day! 👍
Hi, your are using Spring Reactor wrong. You have to do
return Mono.error(new IOException("BAM!")).doOnError(e-> log.error(....));