camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Splitting xml - Send all items or send XML to Error Queue
Date Thu, 12 Mar 2015 10:07:32 GMT

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.

On Wed, Mar 11, 2015 at 11:54 AM, blommish <> 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:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Red Hat, Inc.
Twitter: davsclaus
Author of Camel in Action:

View raw message