You could use an aggregator to group the rows or use scatter gather (well gather since you are already scattered) EIP in order to correlate the rows. As for failing "in error" that rather depends on the error. If an exception is thrown that is not that hard. Gather all of the rows, split, process, aggregate. On the splitter share the unit of work and any exception in that unit of work will fail the exchange. The question is what happens after the exchange fails.
*Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 <http://www.linkedin.com/pub/robert-simmons/40/852/a39>* On Thu, Jun 12, 2014 at 9:42 AM, AndyBell <[email protected]> wrote: > Hi > > I've not used Camel for a number of years and now have a (to me) > non-trivial > task which I wonder if it can be done in Camel using standard camel > component: > > I have a CSV file with structured data in it: > > F1,xxx,,xxx,xxx > F2,XXX,XXX > F2,XXX,XXX > F1,xxx,,xxx,xxx > F2,XXX,XXX > F2,XXX,XXX > F2,XXX,XXX > > There is a logical connection between the rows starting with F1 and the > subsequent F2 rows. So, in the example above, the first 3 rows would form a > logical unit of work and the final 4 rows would form a logical unit of > work. > > Can camel be configured to read in and process this data in LUW groups and > fail the whole LUW should any one of the rows in the LUW be in error? > > Andy > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Logical-Units-of-Work-tp5752206.html > Sent from the Camel - Users mailing list archive at Nabble.com. >
