Hi
     Somehow I am able to get response. But what I observed is that, finally
I am getting response for only one or two messages. I am refering to 'Split
aggregate request/reply sample' example given in
http://camel.apache.org/splitter.html.

My Sample code is as:

public class MyBean() {
          public List<MyDTO> splitInput(MyDTO dto) {
               // inparameter MyDTO contains 4 values and I am splitting the
input
               // in a list of 2 MyDTO. I am returing list of 2 MyDTO, each
will contain
               // 2 values.
          }

        public MyDTO process1(MyDTO dto) {
             // Fetching database values using MyDTO
        }

        public MyDTO process2(MyDTO dto) {
            // Fetching database values using MyDTO
        }

 }


public class MyAggregator implements AggregationStrategy {

       public Exchange aggregate(Exchange old, Exchange newEx) {
                  if(old == null) {
                        return newEx;
                  } 

                if(old !=null && newEx != null) {
                      //update old exchange by adding values from newEx
                }

            return old;
       }

}


<route>
    <from uri="direct:start"></from>
    <split parallelProcessing=true strategyRef=MyAggregator>
       <method bean="Mybean" method="splitInput"/>
       <to uri="bean:myBean?method=process1"/>
       <to uri="bean:myBean?method=process1"/>
    </split>
</route>

As per documents, splitinput() will split input and return the list of
MyDTOs. Now here I want each DTO should be processed separately and return
combined response.

How to acheive this, *am I on right track.*
Thanks 
Bhushan



--
View this message in context: 
http://camel.465427.n5.nabble.com/not-getting-combined-response-from-aggregator-tp5731362p5731796.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to