Created
February 3, 2022 03:25
-
-
Save wenqiglantz/3bfb960f663b8fde98d38371be84d3a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Mono<String> deleteCustomer(@PathVariable String customerId){ | |
return webClient.delete() | |
.uri("/customers/" + customerId) | |
.retrieve() | |
.bodyToMono(String.class) | |
.transform(it -> { | |
ReactiveCircuitBreaker rcb = reactiveCircuitBreakerFactory.create("customer-service"); | |
return rcb.run(it, throwable -> Mono.just(customerId)); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment