使用具有处理链的网关,Dispatcher没有订户错误

时间:2014-10-20 16:28:37

标签: spring-integration

我有以下配置,不确定我一直收到此错误有什么问题,感谢您的帮助,谢谢

    <int:chain input-channel="incoming">
        <int:splitter ref="split"/>
           <int:filter ref="filter" discard-channel="loggit" />
                <int:payload-type-router default-output-channel="loggit" >
                <int:mapping type="a.b.c" channel="channel1" />         
        </int:payload-type-router>      
   </int:chain>

   <int-jdbc:stored-proc-outbound-gateway 
                id="DB_POLLAR"
                data-source="dataSource"
                request-channel="channel1" 
                reply-channel="loggit"
                is-function="false"
                expect-single-result="false" 
                stored-procedure-name="PKG.proc_get">                   
                <int-jdbc:parameter name="rowid" expression="payload" />            
                <int-jdbc:returning-resultset name="ataset" row-mapper="dataMapper"/>       
                <int-jdbc:request-handler-advice-chain>
                    <bean class="com.a.b.c.DbCallAdvice" />
                </int-jdbc:request-handler-advice-chain>                
    </int-jdbc:stored-proc-outbound-gateway>

1 个答案:

答案 0 :(得分:1)

<int-jdbc:stored-proc-outbound-gateway>是一个request/reply组件,因此如果您的目标过程返回一些内容,它将被包装到replyMessage,而Framework会尝试将其发送到output(reply)-channel

由于你没有在那里,并且没有replyChannel标题,你最终会得到Dispatcher has no subscribers error

如果您对该程序中的reply不感兴趣,请考虑使用

<int-jdbc:stored-proc-outbound-channel-adapter>