question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use circuit breaker and retry annotations in reactive application ?

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
chen1icommented, Mar 6, 2020

Thank you! @RobWin You save my day! 👍

0reactions
RobWincommented, Mar 6, 2020

Hi, your are using Spring Reactor wrong. You have to do return Mono.error(new IOException("BAM!")).doOnError(e-> log.error(....));

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found