Re: processing data based on the metadata in the file using apache camel

2014-06-27 Thread Knut-Håvard Aksnes
Probably the simplest solution is to write a small bean or processor, reading the in stream first calculating the target based on the first line then building up the 1000 line packets and sending them using the request or send methods of ProducerTemplate. This is most likely simpler and cleaner tha

Re: processing data based on the metadata in the file using apache camel

2014-06-27 Thread Knut-Håvard Aksnes
Alternatively the Routing slip could be skipped in favor of using Producer templates inside the Aggregator. -- View this message in context: http://camel.465427.n5.nabble.com/processing-data-based-on-the-metadata-in-the-file-using-apache-camel-tp5752593p5752949.html Sent from the Camel - Users

Re: processing data based on the metadata in the file using apache camel

2014-06-27 Thread Knut-Håvard Aksnes
To me this sounds like a combination of The EIPs *RoutingSlip* and *Composed Message Processor*. Composed Message Processor Where most of the work will be done by a custom Message *Aggregator*. The *Splitter *part of the Composed Message Processor needs to split line by line. The Aggregator needs t

Re: processing data based on the metadata in the file using apache camel

2014-06-26 Thread Willem Jiang
camel-file component just treat the file content as input stream, you can write a customer bean to handle the content as you want if it doesn't effect how you grab the file.. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.it

Re: processing data based on the metadata in the file using apache camel

2014-06-26 Thread kraythe .
Sounds like a pretty specialized use case. You could always write your own component or a processor that handles the output of the file2 consumer (which will be a stream) . However when I hear of such specialized use cases I always wonder if the person is not going about it the wrong way. What is t