
Originally Posted by
dudleygb
you could modify some of the sample apps main methods and just spawn a couple of those?
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.
If you then add a
Code:
<poller default="true" task-executor="pool">
<interval-trigger interval="10" />
</poller>
<thread-pool-task-executor id="pool" max-size="50" />
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.
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.