【问题标题】:Reply Time out for StoredProcOutboundGatewayStoredProcOutboundGateway 的回复超时
【发布时间】:2015-09-17 21:53:44
【问题描述】:

我在 Spring 集成中遇到了 StoredProcOutboundGateway 的回复超时属性问题。我已经阅读了文档,它说在 Gateway 的直接通道的情况下回复超时将不起作用。但如果是外部集成网关,即 StoredProcOutboundGateway,它会说
"当发送到 DirectChannel 时,调用将发生在发送者的线程中,因此发送操作失败可能是由更下游的其他组件引起的"

根据我的设计,我的 StoredProcOutboundGateway 回复正在发送到直接通道。在回复超时到期后,StoredProcOutboundGateway 会抛出异常吗? .为了重新创建这个场景,我在 StoredProcOutboundGateway.handleRequestMessage 方法的第一行放置了一个调试点并等待配置的回复超时,但它没有抛出任何异常,即使在配置的时间之后它也返回了成功的响应。

<int:gateway id="idGateway" service-interface="Gateway"> <int:method name="getStoreProcData" request-channel="store.req.channel" reply-channel="store.reply.channel" /> </int:gateway> <int-jdbc:stored-proc-outbound-gateway stored-procedure-name="GE_PKG.GET_PRC" ignore-column-meta-data="true" reply-timeout="2000" request-channel="store.req.channel" reply-channel="store.reply.channel" is-function="false" ............other cursor config </int-jdbc:stored-proc-outbound-gateway>在此输入代码 <int:channel id="store.req.channel" /> <int:channel id="store.reply.channel" /> Spring-Integration V4..1.2 DB oracle ojdbc6

【问题讨论】:

    标签: spring-integration spring-jdbc


    【解决方案1】:

    reply-timeout 仅适用于reply-channel 可以阻止的情况 - 例如已满的有界QueueChannel。

    即这是send 到reply-channel 的超时。

    DirectChannel 永远不会发生这种情况。

    【讨论】:

    • 。谢谢。它本可以在 store proc outbound gateway 部分的文档中提到
    猜你喜欢
    • 2018-03-24
    • 2019-10-03
    • 2020-10-22
    • 1970-01-01
    • 1970-01-01
    • 2018-09-19
    • 2016-07-25
    • 2017-06-23
    • 2020-11-22
    相关资源
    最近更新 更多