Hi

Seems a bit overkill to use EIP patterns to count the number of lines in a file.

Maybe use a java method call for that instead with code to read the
lines, and then at the end you can append the data also
http://javarevisited.blogspot.se/2012/07/read-file-line-by-line-java-example-scanner.html

Then call the java method from the Camel route etc.
http://camel.apache.org/bean


On Tue, May 14, 2013 at 4:27 AM, Baalu <golivams...@gmail.com> wrote:
> Hello,
>
> I am trying to count the number of the lines in a flatfile, once I get that
> value I need to write it back to the flat file as part of the file footer.
>
> For now I did this:
>
> from("direct:fileLinecount").routeId("fileCount")
>                                         
> .pollEnrich("file://C:/filefolder?noop=true")
>                                     .split().tokenize("\n").....
>
> I can see one of the property as "CamelSplitSize" which has the number of
> the lines in the flat file. How to access this property? I am unable to get
> this value in my route with getProperty...any help would be appreciated.
>
> thanks!
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Numbers-of-lines-in-a-flat-file-tp5732455.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to