...
You can mix and match these approaches; specifying a custom processor to be used after all the redeliveries fail together with customizing any aspect of the RedeliveryPolicy
And the spring DSL:
Code Block | ||||
---|---|---|---|---|
| ||||
<onException>
<exception>com.mycompany.MyException</exception>
<redelivyPolicy maximumRedeliveries="2"/>
</onException>
|
Defining multiple exceptions
You can define multiple exceptions in the clause as:
Code Block |
---|
onException(MyException.class, MyOtherException.class).
maximumRedeliveries(2);
|
And in Spring DSL you just add another exception element:
Code Block | ||||
---|---|---|---|---|
| ||||
<onException>
<exception>com.mycompany.MyException</exception>
<exception>com.mycompany.MyOtherException</exception>
<redelivyPolicy maximumRedeliveries="2"/>
</onException>
|
Reusing ReliveryPolicy
TODO: Copy from other