-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Now throttlerLimit() is deprecated everywhere, providing a ThrottlerRepeatOperations could be convenient #4531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Could someone provide an real example of how i can set the "old" throttleLimit with the "new" RepeatOperations. Thanks! |
The document is unclear on how to use custom RepeatOperation to replace the deprecation of throttleLimit however, I have implemented as follows after going through few documentation but still no use @Bean
public RepeatOperations createRepeatOperations() {
TaskExecutorRepeatTemplate repeatOperations = new TaskExecutorRepeatTemplate();
repeatOperations.setTaskExecutor(taskExecutor());
return repeatOperations;
} and use the createRepeatOperations() through AbstractTaskletStepBuilder.stepOperation() |
The solution you provided @rmaheshk won't work since you're using TaskExecutorRepeatTemplate which it self uses the deprecated method. You should implement your own custom RepeatOperations for it to work. |
@NaitYoussef Any samples? |
Hi @NaitYoussef ,@rmaheshk |
@NaitYoussef @rmaheshk @RT-1904129 I would appreciate to have some valuable hints how to get a functional equivialent to the I could implement a workaround to use I know that this is not a perfect solution but wasting a lot of CPU capacities is not feasible for me; the job would run for days instead of a couple of hours. |
Hi @fmbenhassine, If you could assist us implementing in custom |
There is no replacement for that API because the concept of a parallel iteration is flawed by design (see "Concurrency model" in #3950). I saw no reason to invest time in providing a temporary replacement for a flawed approach (ie providing another The new approach to concurrency is coming in the next major release v6 which is planned for later this year. In the meantime, and if it were up to me, I would continue using the deprecated API until the official replacement is provided by Spring Batch. I am closing this issue for now, keep tuned for #3950 ! |
Uh oh!
There was an error while loading. Please reload this page.
As per the note "@deprecated with no replacement since 5.0, scheduled for removal in 6.0. Use a custom {@link RepeatOperations} implementation (based on a {@link TaskExecutor} with a bounded task queue) and set it on the step with {@link #stepOperations(RepeatOperations)}.", I think it would be convenient to have some built-in replacement.
IMO this is pertinent because:
My 2 cents, but thanks either way!
The text was updated successfully, but these errors were encountered: