spring-framework icon indicating copy to clipboard operation
spring-framework copied to clipboard

Support `RetryListener` registration via `@Retryable`

Open alexey-kadyrov opened this issue 3 months ago • 13 comments

It appears that the support for @Retryable is not complete.

The RetryListener API is defined but is not actually used in conjunction with @Retryable.

A new instance of RetryTemplate is created each time in AbstractRetryInterceptor when a retryable operation is called but without setting a RetryListener.

		RetryPolicy retryPolicy = RetryPolicy.builder()
				// ...
				.build();
		RetryTemplate retryTemplate = new RetryTemplate(retryPolicy);

		try {
			return retryTemplate.execute(new Retryable<>() {

alexey-kadyrov avatar Aug 24 '25 17:08 alexey-kadyrov