1 回答
TA贡献1831条经验 获得超4个赞
Ajdbc-inbound-channel-adapter完全基于“硬”轮询逻辑JdbcPollingChannelAdapter及其包装器。SourcePollingChannelAdapter
我很确定您已经<poller>为提到的jdbc-inbound-channel-adapter或全局提供了配置。
那个有这个选项:
<xsd:attribute name="error-channel" type="xsd:string">
<xsd:annotation>
<xsd:documentation><![CDATA[
Identifies channel that error messages will be sent to if a failure occurs in this
poller's invocation. To completely suppress Exceptions, provide a
reference to the "nullChannel" here.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
因此,当轮询 DB 期间出现一些错误时,它将被包装到 anErrorMessage并发送到已配置的error-channel. 如果未提供,则将使用全局errorChannelbean。
有关详细信息,请参阅参考手册中的错误处理章节:https ://docs.spring.io/spring-integration/docs/current/reference/html/configuration.html#namespace-errorhandler
添加回答
举报
