Closed
Description
Hey,
I recently encountered this case whereby methods which are annotated @Retryable
with no list of listeners
being passed automatically has them added to the executing RetryTemplate
at runtime. Upon reading up on the source, this is expected, since RetryListener
instances which are injected into the application context become, so called, "global" listeners. Unfortunately, this has unexpected consequences in some cases, and it would be awesome to also be able to specify a list of excludeListeners
in the @Retryable
annotation.
I know it's feasible to also pass a label and introspect it at the listener level to make the execution decision, but that, afaik, isn't the intended purpose of that parameter.