I'm going through spring integration reference document and in section 10.1.8 Asynchronous Polling it's written that out of tune conf can cause memory leak.
As per docs below is out of tune conf :
<int:channel id="publishChannel">
<int:queue />
</int:channel>
<int:service-activator input-channel="publishChannel" ref="myService">
<int:poller receive-timeout="5000" task-executor="taskExecutor" fixed-rate="50" />
</int:service-activator>
<task:executor id="taskExecutor" pool-size="20" />
I'm having trouble in understanding this section as it's written 4 threads will be executed every second as each thread will wait for 250 ms and task will be added at rate of 20 per second.
Shouldn't task executor assign only 1 thread to wait for incoming message and should start max threads in case there's sufficient task in queue? Also why only 4 thread will execute per second what if task takes more than 250 ms?
Apologies if it's too simple and I'm missing something trivial.