2

I have a spring integration aggregator configured like below expecting that it should call the method aggregateTask() either after group size is 500 or after reaching the timeout,

<int:aggregator id="taskAggregator"
      input-channel="aggregatorInChannel" output-channel="splitterInChannel"
      method="aggregateTask" ref="taskAggregationService"   release-strategy-expression="size() == 500"   
    send-partial-result-on-expiry="true" send-timeout="5000" expire-groups-upon-completion="true" group-timeout-expression="size() ge 250 ? 300 : -1" >
</int:aggregator>

And I have a multi threaded task executor to execute task in aggregatorInChannel,

<int:channel id="aggregatorInChannel">
        <int:dispatcher task-executor="aggregatorThreadPoolExecutor" /> 
    </int:channel>
<task:executor id="aggregatorThreadPoolExecutor" pool-size="0-20" />

When I am running my service I found that even when there are thousands of messages in the aggregatorInChannel there is a delay of about 40s in calling aggregateTask(). Any ideas on my issue?

Thudani Hettimulla
  • 754
  • 1
  • 12
  • 32
  • Looks like you have a `thread starvation` issue, when the same `TaskScheduler` (an `aggregator` background), that `aggregatorThreadPoolExecutor` and some `` use each other. So, with the thousands of messages you end up with the delay issue. I understand that your application may be enough big, so try to figure out who eats your thread. – Artem Bilan Aug 20 '15 at 18:57

0 Answers0