Actually you can do better than that. The CafeDemo sample drops messages in a queue in a loop. There is no delay in the handoff (as long as the queue has capacity). If you give the orders channel a queue with high capacity and loop a little longer you can clearly see the system takes a long time to process after the messages have been dropped in the queue.
Originally Posted by dudleygb
If you then add a
to the cafeDemo.xml (and remove the poller children from the endpoints) you can see the multiple threads working for you. The hard part is to analyze the system obviously.
<poller default="true" task-executor="pool">
<interval-trigger interval="10" />
<thread-pool-task-executor id="pool" max-size="50" />
The main thing I'd have against using the CafeDemo sample is that it has a Thread.sleep(..) to simulate IO. This isn't the same thing of course, so you should for example pull something from the network or disk instead.