Description
This issue is to propose exposing value-based BackOffPolicy
creation logic, currently in this part of the AnnotationAwareRetryOperationsInterceptor
class, through a BackOffPolicyBuilder
class, so other Spring
projects and perhaps end users can use it, keeping consistency throughout the projects and avoiding duplicated logic.
Context
When Spring Kafka
's Non-blocking retries feature was developed, the Spring Retry
project wasn't getting many releases. As we wanted to leverage some of Spring Retry
's functionality, such as the @BackOff
annotation and the BackOffPolicy
interface and implementations, the solution was to duplicate the BackOffPolicy
creation logic in Spring Kafka
, as can be seen here.
Now that we're in the process of adding auto configuration capabilities to the feature, we need to be able to access this logic in Spring Boot
as well. After discussing this matter with @wilkinsona and @artembilan, considering the Spring Retry
project is now getting more support, it seems like the right approach would be to make this logic accessible through a BackOffPolicyBuilder
and use it both in Spring Kafka
and Spring Boot
projects.
If that does look like the right approach I can provide a PR, if that's ok.
Thanks, and I'm really glad to see this project under more active support again, it's a very useful and well-thought project.