2
我的應用程序中有以下xml配置,我想將其轉換爲Java DSL。如何將Spring Integration XML轉換爲Java DSL for errorChannel
所以在這篇文章中我明確地定義了錯誤通道的名稱。主要是例如原因。有了這個引用,我期望發生的情況是下游進程拋出異常,並且它應該通過錯誤通道將有效負載路由回去。 Java代碼是什麼樣的?
<int-jms:message-driven-channel-adapter
id="notification"
connection-factory="connectionFactory"
destination="otificationQueue"
channel="notificationChannel"
error-channel="error"
/>
<int:chain id="chainError" input-channel="error">
<int:transformer id="transformerError" ref="errorTransformer" />
<int-jms:outbound-channel-adapter
id="error"
connection-factory="connectionFactory"
destination="errorQueue" />
</int:chain>
愚蠢的問題?你能否更新這個例子來反映這個? – zachariahyoung
經過更新以顯示errroChannel定義 –
xml配置中的Gary我不必爲errorChannel定義消息通道。 DSL能否以相同的方式行事?我認爲messageDriverChannelAdapter上的.outputChannel也可以以同樣的方式工作。 – zachariahyoung