のいずれかにエラーが発生したときにエラーチャンネルを呼び出す:移動し、任意の例外は、「firstChannel」の流れにスローされる2以下のいずれかが起こっている場合は、受信者リスト - ルータ
- 無視して-send-failures = "true"プロパティの場合、 "secondChannel"は が呼び出され、 "myErrorChannel"は呼び出されません。
- ignore-send-failures = "true"プロパティがない場合、 "secondChannel"は呼び出されず、 "myErrorChannel"が呼び出されます。
「firstChannel」フローで例外がスローされた場合、「secondChannel」と「myErrorChannel」の両方を呼び出す方法を教えてください。 設定の詳細は、以下を参照してください:下流の流れは、フローの最初のコンポーネントのために、単一のブラックボックス呼び出しのようですので
<int:channel id="myErrorChannel" datatype="java.lang.Throwable"/>
<int:service-activator input-channel="myErrorChannel" >
<beans:bean class="org.springframework.integration.samples.jms.ErrorServiceActivatorProxy"></beans:bean>
</int:service-activator>
<jms:message-driven-channel-adapter id="jmsIn" channel="jmsInChannel" destination="requestQueue" error-channel="myErrorChannel"/>
<int:channel id="firstChannel" />
<int:channel id="secondChannel" />
<int:recipient-list-router id="recipientListRouter" input-channel="jmsInChannel" ignore-send-failures="true">
<int:recipient channel="firstChannel"/>
<int:recipient channel="secondChannel"/>
</int:recipient-list-router>
<int:channel id="firstChannelOutboundChannel"/>
<int:transformer input-channel="firstChannel" output-channel="firstChannelOutboundChannel">
<beans:bean class="org.springframework.integration.samples.jms.FileIOTransformer"></beans:bean>
</int:transformer>
<jms:outbound-channel-adapter
id="firstChannelOutbound"
channel="firstChannelOutboundChannel"
connection-factory="jmsConnectionFactory"
destination="outputQueueOne"
auto-startup="true" />
<jms:outbound-channel-adapter
id="secondChannelOutbound"
channel="secondChannel"
connection-factory="jmsConnectionFactory"
destination="outputQueueTwo"
auto-startup="true"/>
お寄せいただきありがとうございます! –