Dead Letter Channel – handling errors later

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

Get Apache Camel Developer's Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.