camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cwhistler <>
Subject file delete doesn't work when using filter
Date Mon, 25 Jul 2011 19:22:15 GMT
I have the following java route:


The errorFileFilter reference simply returns false if the file name contains
some error file markers.

The processor simply adds up the lines in the file and adds a header and
trailer record to it:
BufferedReader inputReader = exchange.getIn().getBody(BufferedReader.class);
long idx = 0;
	while (null != (inputReader.readLine()))
catch(Exception e)
exchange.getIn().setBody(getHdr() + "\n" +
exchange.getIn().getBody(String.class) + getEnd(idx) + "\n");

When the route ends the input file is not deleted.  it simply gets
reprocessed over and over.

So can I do this and still have the input file deleted?

I am using camel 2.7.2

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message