Reactive Retry
@Retryable
advice can also be applied to methods that return reactive types, such as Publisher
(Project Reactor‘s Flux
or RxJava‘s Flowable
). For example:
Applying Retry Policy to Reactive Types
@Retryable
public Publisher<Book> streamBooks() {
// ...
Applying Retry Policy to Reactive Types
@Retryable
Flux<Book> streamBooks() {
// ...
Applying Retry Policy to Reactive Types
@Retryable
open fun streamBooks(): Flux<Book> {
// ...
In this case @Retryable
advice applies the retry policy to the reactive type.