Hi You can likely do a composed message processor EIP (see using splitter only option) to split and build each sub message, and validate. And in the agg strategy you just add each sub message to a list
And in case of validation error you can thrown an exception, and use the sharedUnitOfWork option, and the useOriginalMessage on the error handler, to send that message to the error queue - and use stop on exception - then the splitter will break out asap. If no validation error then route to a 2nd split afterwards to send each splitter message. http://camel.apache.org/composed-message-processor.html http://camel.apache.org/splitter.html On Wed, Mar 11, 2015 at 11:54 AM, blommish <[email protected]> wrote: > Hi, > > So I have a XML data which i will split, transform every item, send every > item to validator and then send to an endpoint. > But I want to be sure all items validate before sending them to the > endpoint, so its All or None, if an error would arise on any item I want to > send the XML data(before splitting) to my ErrorQueue. > > How could I achieve this? > > Thanks > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Splitting-xml-Send-all-items-or-send-XML-to-Error-Queue-tp5764002.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: [email protected] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
