Claus,
   I think I figured it out how to aggregate the messages using Aggregator.
I added a headerName called id and use it as my correlation id.

 <camel:route>
        <camel:from uri="file:src/data/catask/test?noop=true"/>
        <camel:log message="${body}"></camel:log>
        <camel:split>
                <camel:xpath>//te:Orders/*</camel:xpath>
                <camel:to uri="direct:addHeaders"/>
                  <camel:to uri="direct:aggegateQueries"/>
        </camel:split>
 
    </camel:route>
    
    <camel:route>
        <camel:from uri="direct:addHeaders"/>
        <camel:setHeader headerName="id">
                <camel:constant>order</camel:constant>
        </camel:setHeader>
         
    </camel:route>
    
      <camel:route>
        <camel:from uri="direct:aggegateQueries"/>
        <camel:aggregate strategyRef="aggrTask" completionInterval="8000" >
                <camel:correlationExpression>
                        <simple>header.id</simple>
                </camel:correlationExpression>
                <camel:to 
uri="file:src/data/catask/output?fileName=output.xml"/>
                <camel:log message="MERGED:: /n ${body}"></camel:log>
        </camel:aggregate>
    </camel:route>  


This aggregates my messages. However I am still not sure that despite using
correct XPATH why does Camel thinks that it is different type of message?




--
View this message in context: 
http://camel.465427.n5.nabble.com/Split-and-Aggregate-Old-Exchange-is-null-everytime-in-AggregationStrategy-tp5746365p5746405.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to