Andrea
Andrea

Reputation: 2764

Apache Camel: file2 and split each line

I have a route configured as following:

<route>
   <from uri="file:mydir" />
   <split streaming="true" parallelProcessing="true">
       <tokenize token="\n" xml="false" trim="true" />
       <to uri="seda:requests" />
   </split>
</route>

This is running on Linux but files in "mydir" coming from applications running both on Linux (\n) and Windows (\r\n) so my split fails in the second case

How can I have one configuration for both cases?

Upvotes: 0

Views: 3096

Answers (1)

Andrea
Andrea

Reputation: 2764

Found...that was really simple:

<tokenize token="\r\n|\n" xml="false" trim="true" />

Upvotes: 6

Related Questions