camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: Dead Letter Channel and errorHandling usecase help.
Date Thu, 27 May 2010 04:37:41 GMT

Can you set the deadLetterChannel with a direct endpoint, and chain the
custom processing and file endpoint as you want.


   .transform(body().append(" World"))



ankelee wrote:
> Hi
> In relation to this post:
> I'm really stuck on my use case.
> <from file>
> <to translator>
> <to jms>
> 1) If route fails I want to move the original file through some custom
> processing steps and send it to a directory (and remove it from the source
> directory (consume it)).
> 2) If route completes I want to move the original file to a backup
> directory.
> 2) Could be solved either by using: 
> <onCompletion onComeplete="true">
> <to backupdir>
> </onCompletion>
> or by putting ?move=backup on the file endpoint.
> The problem is then that 1) negates this by handling the exception. ?move=
> and onCompletion then thinks that the route ended succesfully and go ahead
> and move the file to the backup folder anyways.
> So what to do? Don't handle the exception by using onException. This would
> be ok too, but then the file will not be deleted/consumed from the source
> directory such as the deadletterErrorHandler would do.
> This seems like a really really simple thing to do but I guess I'm using a
> wrong combination of components for it.
> Any ideas?

View raw message