Looking at the flow diagram, it looks like the flow has many single-threaded elements and can be optimized to be much more parallel with higher throughput.
To start with a message-driven channel adapter (you did not specify a configuration for this), you can configure more than 1 default consumer , and you can make it consume a reasonable number of messages per consumption cycle .
The stream that passes the message through the channel adapter, which places the message in direct channel 1, will unfortunately run the rest of the stream, since there is no buffering elsewhere, so when your message is placed in βDirect channel 1β, it will immediately calls the router in the same thread, then calls the service activator and the Mail adapter or the JMS Outbound adapter in the same thread. The change here may be to enter the queue channel instead of direct channel 1 , so the thread that consumes the message simply puts the messages on the queue channel, then runs with it.
Besides direct channel 1 (changed to queue channel 1), I think it can be single-threaded based on how fast or slower your stream is , if they say that the mail adapter is slow, and direct channel 4 can make the queue channel also , same with Direct Channel 5
Can you see if these changes were highlighted in bold with improved flow
source share