camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: how can I do this?
Date Thu, 02 Feb 2012 16:34:57 GMT

You can use a direct endpoint as the DLC


And then a route where you write the error file, and then afterwards
the original file.


   .bean(new WriteErrorFileBean());

public class WriteErroBean {

   public void writeErrorReport(File file, Exception cause,
CamelContext context) {
     ... write a error file based on the error message
     .. you can use a camel producer template to save the file, but of
course use Java File API also works


On Thu, Feb 2, 2012 at 5:28 PM, cbuxbaum
<> wrote:
> Hello,
> I have a route that takes a file from one location and processes it to
> another.  On Exception, I would like to have the file deposited in a
> deadletter location (note, a location, not a queue).  So I have that feature
> working, but additionally, I would like to retrieve the exception from the
> exchange, and create a log file next to the file in the dead letter
> location, something like,
> There does not seem to be any way to intercept the dead letter processing
> just before or after moving to the dead letter queue in order to create the
> log file.  I can think of other ways of doing this, but I like the retry
> feature of the deadletter channel, and just want to add some processing to
> the end.
> Thanks,
> Carl
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message