Skip to content

Conversation

parkgeonhu
Copy link

This change introduces a programmatic alternative to @ConcurrencyLimit.
I've structured this implementation similarly to RetryTemplate.

  • Added ConcurrencyLimitTemplate for callback-style execution under a concurrency limit
  • Added ConcurrencyLimited functional interface (user-supplied unit of work)

Closes gh-35460


As a side note, it might be worth exploring a design for ConcurrencyThrottleInterceptor that's similar to AbstractRetryInterceptor in the future. 😀

This is my first time contributing, so I'm very open to feedback. Please let me know what can be improved or what kind of tests you'd like to see added.

Closes spring-projectsgh-35460

Signed-off-by: Geonhu Park <parkgeonhu@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 28, 2025
@sbrannen sbrannen added the in: core Issues in core modules (aop, beans, core, context, expression) label Sep 29, 2025
@sbrannen sbrannen requested a review from jhoeller September 29, 2025 14:42
@jhoeller
Copy link
Contributor

This is a fine implementation, well adapted to our coding practices - good job there!

However, please see #35460 (comment) - I went with a different approach for 7.0, baking this support into SyncTaskExecutor.

Thanks for the PR, in any case!

@jhoeller jhoeller closed this Oct 11, 2025
@jhoeller jhoeller self-assigned this Oct 11, 2025
@jhoeller jhoeller added status: superseded An issue that has been superseded by another and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Oct 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: core Issues in core modules (aop, beans, core, context, expression) status: superseded An issue that has been superseded by another

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide programmatic alternative to @ConcurrencyLimit

4 participants