...
Wiki Markup |
---|
{snippet:id=e4|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelOnExceptionOnRedeliveryTest.java} |
Using onRedelivery in Spring DSL
In Spring DSL you need to use the onRedeliveryRef attribute to refer to a spring bean id that is your custom processor:
Wiki Markup |
---|
{snippet:id=e1|lang=xml|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/DeadLetterChannelOnExceptionOnRedeliveryTest.xml} |
And our processor is just a regular spring bean (we use $ for the inner class as this code is based on unit testing)
Wiki Markup |
---|
{snippet:id=e2|lang=xml|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/DeadLetterChannelOnExceptionOnRedeliveryTest.xml} |
Using fine grained retry using retryUntil predicate
...