Hello

I'm trying to create a route which does the following:

   * Reads a file from the /input path, containing Java-property-like
     entries. Let's assume it for example contains:
         o p1 = x
         o p2 = y
         o p3 = z
         o p4 = t
   * Splits the file into two files and puts it into /output_2 and
     /output_3
         o /output_2 should only receive the properties p1 and p2, e.g.:
               + p1 = x
               + p2 = y
         o /output_3 should only receive the properties p1 and p3, e.g.:
               + p1 = x
               + p3 = z
   * Once the writing of these files finished, move the original file
     in /input into /backup

I'm attaching some images for illustrating this.

Now, here's the issue: when I do a route like the following:

   from("file:/input").
   to("direct:output_2", "direct:output_3").
   to("file:/backup");

   from("direct:output_2").process(OnlyKeepPropertyProcessor("p1",
   "p2").to("file:/output_2");
   from("direct:output_3").process(OnlyKeepPropertyProcessor("p1",
   "p3").to("file:/output_3");

Then only p1 and p2 is passed to the process3, and the file in /output_3 contains only p1. Worse, the backup only backs up what's in output_3...

What is the good EIP for such a route?

Thanks

--

S. Ali Tokmen
savas-ali.tok...@bull.net

Office: +33 4 76 29 76 19
GSM:    +33 66 43 00 555

Bull, Architect of an Open World TM
http://www.bull.com

Reply via email to