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
添加回答
舉報