THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
For instance configuring the dead letter channel as:
Using the Fluent Builders
Code Block | ||||
---|---|---|---|---|
| ||||
errorHandler(deadLetterChannel("jms:queue:dead") .maximumRedeliveries(3).redeliverDealyredeliveryDelay(5000)); |
Using the Spring XML Extensions
Code Block | ||||
---|---|---|---|---|
| ||||
<route errorHandlerRef="myDeadLetterErrorHandler">
...
</route>
<bean id="myDeadLetterErrorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder">
<property name="deadLetterUri" value="jms:queue:dead"/>
<property name="redeliveryPolicy" ref="myRedeliveryPolicyConfig"/>
</bean>
<bean id="myRedeliveryPolicyConfig" class="org.apache.camel.processor.RedeliveryPolicy">
<property name="maximumRedeliveries" value="3"/>
<property name="redeliveryDelay" value="5000"/>
</bean>
|
The Dead Letter Channel above will clear the caused exception when the Exchange is moved to the jms:queue:dead
destination and the client will not notice the failure.
...