Search code examples
spring-integration

which Executor are Pollers using by default?


Inside Spring-Integration source-code, from where do Pollers (e.g. fixed-delay Poller) get their default executor if none explicitely specified ? (is that default executor shared between Pollers ?)
(the reason I'm asking is because #1 I'm having some troubles to navigate the source-code, #2 I have 2 message-queues polled by 2 pollers with no executor specified; the 1rst queue triggers a long running task which seems to prevent the 2nd poller from firing)
Thanks a lot in advance for your time and your expertise.
Best Regards


Solution

  • I think there is a bit misunderstanding : the polling is done by scheduler . The executor does not have an option to schedule a task in the future.

    Another concern is correct : there is a single shared task scheduler in the application context which cannot be per instance yet. However I guess you use Spring Boot which comes with a single-threaded scheduler by default . Consider to increase its thread pool.

    You also indeed can configure a specific executor per queue channel to shift a task to the separate threes to not overhead a scheduler.