If any exception is thrown in "firstChannel" flow, either of below two is happening:
- With ignore-send-failures="true" property, "secondChannel" is invoked and "myErrorChannel" is not invoked.
- Without ignore-send-failures="true" property, "secondChannel" is not invoked and "myErrorChannel" is invoked.
Please suggest me how I can invoke both "secondChannel" and "myErrorChannel" both if any exception is thrown in "firstChannel" flow. Please see below configuration details:
<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"/>