springjdbcspring-integrationspring-jdbc

Spring Integration multiple integration flows, each with its own JDBC Inbound Channel Adapter


I want to read from 4 database tables using JDBC Inbound Adapters with polling. Each JDBC Inbound Adapter serves as the starting point of one of my 4 integration flows. Each flow is independent of the others.

My question is: Is it possible to have multiple integration flows, each with its own JDBC Inbound Channel Adapter, in Spring Integration?


Solution

  • Yes. You can do that. Spring projects are designed for enterprise in mind. Therefore you indeed can have multi-thread solution.

    Not clear why have you raised the question before trying that yourself.

    Either way, keep in mind that Spring Boot auto-configure a TaskScheduler with one thread in its pool by default: https://docs.spring.io/spring-boot/reference/features/task-execution-and-scheduling.html#page-title. So, you may think about increasing that pool size. All the polling channel adapters rely on that TaskScheduler for their polling tasks: https://docs.spring.io/spring-integration/reference/channel-adapter.html#channel-adapter-namespace-inbound