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

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

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (10 by maintainers)

Most upvoted comments

Thank you! @RobWin You save my day! πŸ‘