Closed linzee1 closed 1 month ago
@linzee1 Thanks for your professional issue π
It'll take some time to understand and feedback. π
more info about retry see the author's article ιθ―ζΊεΆδΈCompletableFuture
ζε±. π
Mature resilience4j
fault tolerance library provides retry
with first-class support of CompletionStage
/CompletableFuture
.
It's recommended to use resilience4j retry
rather than re-implementing in cffu
.
Here is a Spring Retry example:
It is easy to implement retry for
CompletableFuture
.but it is better to add static utility method for CompletableFuture with less bug and multiple retry strategy support.
There are 3 types of strategies for retrying:
Goal:
retry(Retry retry, Supplier(CompletionStage<T>) supplier) : CompetionStage<T>