this.from(FROM_FOLDER) .split(new LdapEntitySplitExpression(), new LdapAggregationStrategy()) .process(new LdapModifyProcessor()) .end() .to(TO_FOLDER);
it works and aggregates processed messages into the same file but i want to complicate a little bit. What i want to do is to split a file from a file endpoint, process each entry separately and then according to the entry content, i want to aggregate them into different files. So i wrote the code below but in this case the aggregation doesn't work, the outputs are in separate files. this.from(m_from_folder_url) .split(new LdapEntitySplitExpression(),new LdapAggregationStrategy()) .process(new LdapModifyProcessor(hMap)) .choice() .when(header("type").isEqualTo("add")) .to(m_to_folder_url) .when(header("type").isEqualTo("modify")) .to(m_to_folder_url) .end(); So does anyone have an idea to solve it? Thanks. dulanov wrote: > > Try to use this.from(FROM_FOLDER).split(new LdapEntitySplitExpression(), > new > LdapAggregationStrategy()).process(new > LdapModifyProcessor()).end().to(TO_FOLDER); > > On Thu, Oct 15, 2009 at 5:01 PM, kodcanavari <kodcanav...@gmail.com> > wrote: > >> >> Hi, >> >> I want to use an aggregator in order to aggregate all messages comming. >> On my route i'm making a split with a splitter , then i process every >> messages in parallel >> and then i want to aggregate them all into a single file. >> >> Here is my snippet : >> >> >> this.from(FROM_FOLDER).split(new LdapEntitySplitExpression()).process(new >> LdapModifyProcessor()).aggregate(header("LDIFRecord"),new >> LdapAggregationStrategy()).to(TO_FOLDER); >> >> >> and inside LdapModifyProcessor() i do: >> >> exchange.getOut().setHeader("type", "LDIFRecord"); >> >> but it does not work. >> >> can anyone tellme how can i let every messages go thru aggregator? >> >> regards. >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/How-to-aggregate-all-messages-into-a-single-message--tp25908234p25908234.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://old.nabble.com/How-to-aggregate-all-messages-into-a-single-message--tp25908234p26155433.html Sent from the Camel - Users mailing list archive at Nabble.com.