Search code examples
spring-integration

How does taskExecutor with Queue size set work with AcceptOnceFileListFilter filter for file input adapter


From what I understand

  1. If you have taskExecutor with 10 pool size and 50 queue size, in the situation where all threads are occupied and the queue is full and I don't set a caller policy, I think the default caller is abort policy which rejects the new polling files when full.

But, if I set my poll fixed rate to 2000 and max-message-per-poll=10, does that mean once the queue has space, it will essentially "retry" the aborted file/task or it won't since I'm using AcceptOnceFileListFilter (Since not sure if rejected task means it was accepted once already)

What I need to happen: I have a input file adapter that is polling a directory and processing .txt files received from an MQ. If the thread pool + queue is full, then it should wait till current processing is finished then keep on adding more as threads/queues are become free. (I'm using Spring Integration xml)


Solution

  • If the task executor cannot accept new tasks, then no any new files are polled and no interaction with that AcceptOnceFileListFilter. Therefore it is like retry on each poll, but not per file and rather for the whole command as a task per se.