What is the difference between maxPoolSize and throttleLimit in the Spring ThreadPoolTaskExecutor

Viewed 65

I would like to know the difference between maxPoolSize and throttleLimit while using in the ThreadPoolTaskExecutor for batch operation? Are there any criteria while choosing the corresponding values?

When I configured throttleLimit > maxPoolSize, Spring Batch job did not end. What is the reason behind it?

Configuration(Job not ending even after receiving null in IteamReader)

batch:
    chunkSize: 1
    maxPoolSize: 20
    throttleLimit: 40
    queueSize: 5
    coreSize: 5

Configuration(Working):

batch:
    chunkSize: 1
    maxPoolSize: 20
    throttleLimit: 10
    queueSize: 5
    coreSize: 5 
0 Answers
Related