Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
xml
xml

<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
xml
xml

<onException>
   <exception>com.mycompany.MyException</exception>
   <exception>com.mycompany.MyOtherException</exception>
   <redelivyPolicy maximumRedeliveries="2"/>
</onException>

Reusing ReliveryPolicy

TODO: Copy from other