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?