Open nightswimmings opened 10 months ago
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. Check this post it says the same thing https://github.com/spring-projects/spring-batch/issues/4389#issuecomment-1697409295
@NaitYoussef Any samples? @rmaheshk - If you were able to fix this please share the details
Hi @NaitYoussef ,@rmaheshk Can you give me some Tips or examples on how to implement this ???
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!