Skip to content

Add TaskCallback/Callable/Runnable wrapper for retryable tasks #36208

@jhoeller

Description

@jhoeller

For use with SyncTaskExecutor and SimpleAsyncTaskExecutor, we can provide a convenient wrapper for TaskCallback and also Callable/Runnable, as an alternative to explicit RetryTemplate invocations in custom task callbacks (which commonly leads to double-nested lambda expressions).

In combination with our concurrency limit support on both SyncTaskExecutor (#35460) and SimpleAsyncTaskExecutor, this org.springframework.core.retry.support.RetryTask completes a convenient resilience feature arrangement for programmatic purposes, matching what @ConcurrencyLimit and @Retryable provide for method interception.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions