-
Book Overview & Buying
-
Table Of Contents
Apache Camel Developer's Cookbook
By :
Camel's Dead Letter Channel error handler helps when you want to send generic errors to a particular endpoint. It can also be useful if you just want to capture the message that caused the error for manual processing later.
This technique allows you to send the Exchange instance that caused the error to a specific Camel endpoint (for example, activemq:queue:somethingBadHappenedQueue), or to send the message to another route (for example, seda:error). Remember that for Camel, an endpoint URI can refer to either another Camel route (the URI within the from(…) element), or it can be a producer endpoint (sends a message somewhere), for example activemq:queue:errorQueue.

This recipe will show you how to use Camel's Dead Letter Channel error handler to send the exchange to another Camel route for processing.
The Java code for this recipe is located in the org.camelcookbook.error.dlc package. The Spring XML files are located under src/main/resources...