Versions Compared

Key

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

...

In Camel 1.4 we have introduced the concept of configuration of the error handlers using spring XML configuration. The sample below demonstrates that you can configure transaction error handlers in Spring XML as spring beans. These can then be set as global, per route based or per policy based error handler. The latter has been demonstrated in the samples above. This sample is the database sample configured in Spring XML.

Notice that we have defnined defined two error handler, one per route. The first route uses the transaction error handler, and the 2nd uses no error handler at all.

...

Wiki Markup
{snippet:id=e2|lang=xml|url=activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/TransactionErrorHandlerBuilderAsSpringBeanTest.xml}

DelayPolicy

DelayPolicy is a new policy introduced in Camel 1.5, to replaces the RedeliveryPolicy used in Camel 1.4.
Notice the transactionErrorHandler can be configured with a DelayPolicy to set a fixed delay in millis between each redelivery attempt.

See Also

...