-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Description
Overview
@Retryable currently does not support the configuration of a timeout.
Similarly, it is currently not possible to implement a timeout with RetryPolicy and RetryTemplate since a BackOff policy is only applied to retry attempts which do not include the initial attempt.
We should therefore provide a timeout attribute in @Retryable and the ability to configure a timeout with the RetryPolicy.Builder.
For imperative operations, the timeout will need to be part of the configured RetryPolicy which the RetryTemplate can then use to implement the timeout.
For reactive pipelines with @Retryable, we should be able to use the built-in timeout support in Project Reactor.
In any case, the timeout should apply to the initial attempt as well as all retry attempts.