Hi I'm new to camel , I have a issue in splitting a file based on content
.The below code only splitting one list of lines (ex: 0001 in the file file)
, I want to split the file based on the content(like 0001,0002,003) and
aggregate it as a one Map object. can anybody help me this.


My code is like this ,

                        from("file:{{filepath}}?noop=true")
                                .split(body().tokenize("\n"))
                                .streaming()
                                .filter(body().startsWith("0001"))
                                .filter(body().startsWith("0002"))
                                .filter(body().startsWith("0003"))
                                .unmarshal(bindy)
                                .aggregate(constant(true), 
getFileAggregationStrategy()).end();





My file is like this


0001 some text here1
0001 some text here2
0001 some text here3
0001 some text here4
0001 some text here5
0001 some text here6
0001 some text here7
0002 some text here1
0002 some text here2
0002 some text here3
0002 some text here4
0002 some text here5
0002 some text here6
0002 some text here7
0002 some text here8
0003 some text here1
0003 some text here2
0004 some text here3
0004 some text here4
0004 some text here5
0004 some text here6
0004 some text here7
0004 some text here8
0004 some text here8




--
View this message in context: 
http://camel.465427.n5.nabble.com/Split-file-based-on-content-tp5794986.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to