队列通道发送超时的建议

时间:2014-04-29 11:47:24

标签: spring-integration

有没有办法为QueueChannel的doSend方法指定一条建议,比如RequestHandlerAdvice。

我有一个Filter将数据发送到队列通道(发送超时为0)。当队列已满时,会引发异常。我想要捕获此异常,而不是将其丢给发件人。

<int:filter id="filterA" input-channel="channelA" output-channel="channelB" 
        method="fltrBsdOnCondtn" ref="fltr" send-timeout="0" />

<int:channel id="channelB">
    <int:queue capacity="5000" />
</int:channel>

提前致谢!

此致 Satheesh

1 个答案:

答案 0 :(得分:0)

您可以使用正常的Spring AOP配置在队列通道上使用自定义建议。

但是,将error-channel放在启动流程的任何内容(例如<gateway/>)并在那里处理错误可能更容易。

相关问题