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

  1. @Retryable
  2. public Publisher<Book> streamBooks() {
  3. // ...

Applying Retry Policy to Reactive Types

  1. @Retryable
  2. Flux<Book> streamBooks() {
  3. // ...

Applying Retry Policy to Reactive Types

  1. @Retryable
  2. open fun streamBooks(): Flux<Book> {
  3. // ...

In this case @Retryable advice applies the retry policy to the reactive type.