Spring Integration Aggregator未按预期发布

时间:2015-08-11 05:36:06

标签: java spring-integration

我有一个如下配置的spring集成聚合器,期望在组大小为500或达到超时后它应该调用方法aggregateTask()

<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>

我有一个多线程任务执行器来执行aggregatorInChannel

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

当我运行我的服务时,我发现即使aggregatorInChannel中有数千条消息,在呼叫aggregateTask().时仍有大约40秒的延迟 关于我的问题的任何想法?

0 个答案:

没有答案