Spring Integration Executor Channel丢失项目

时间:2014-08-29 12:43:06

标签: spring-integration channel

出于某种原因,以下Executor Channel仅处理5个项目并丢弃其余项目:

<task:executor id="ImportItemExecutor" pool-size="5"/>   
<channel id="ImportItemChannel" datatype="com.processing.data.generic.ImportItem,java.lang.String">
    <dispatcher task-executor="ImportItemExecutor"/> 
</channel>

输入如下:

<!-- Processing: Create IMPORT_SOURCE, prepare file as resource, and let the kernel handle the processing -->
<chain id="ProcessingXmlChain" input-channel="FullEarningsResponseChannel" output-channel="ImportItemChannel">
    [Code shortened]
    <splitter id="FullEarningsSplitter" ref="FullEarningsSplitterBean"/>
</chain>

唯一的消费者看起来像这样:

<chain id ="ImportItemChain" input-channel="ImportItemChannel" output-channel="ReportedFileChannel">
        <!-- Call the main processing pipeline which returns a Report object as payload -->        
        <gateway request-channel="ResultRouterChannel" error-channel="errorChannel"/>

        <!-- Outgoing payload must be the processed file -->
        <transformer expression="headers.file_xml"/>
</chain>

这种奇怪行为可能是什么原因? 如何解决?

1 个答案:

答案 0 :(得分:1)

他们没有丢失,他们排队 - 5个线程在做什么?使用jstack或VisualVM进行线程转储。

我的猜测是你的网关正在等待回复。