Same issue.  

By the way, here is my route sends the split message to the "seda:split".



from("file://./target/?fileName=raw.xml")
   .routeId("FileIngest")
   .split()
      .tokenizeXML("offer")
      .parallelProcessing()
      .streaming()
   .unmarshal().jaxb("com.otherCompany.ingest.model")
   .bean(classOf[CouponProcessor]) --> This is doing a Dozer conversion
for normalization
   .to("seda:Split")

    from("seda:Split")
   .routeId("Split")
   .aggregate(new MyAggregationStrategy())
     .constant(true)
     .completionFromBatchConsumer()
     .completionPredicate(header("CamelBatchComplete").isEqualTo(true))
   .to("file://./target/?fileName=transformed.xml")



On 11/29/12 12:50 PM, "Charles Moulliard" <[email protected]> wrote:

>Do you observe the same behavior if you start your camel route with direct
>component (from("direct:a")) ?
>
>
>On Thu, Nov 29, 2012 at 6:47 PM, Jason Chaffee
><[email protected]>wrote:
>
>> It is doesn't complete until after some 20,000 calls, I confirmed that
>>is
>> correct.  However, the oldEchange is null for every single one of them.
>>
>>
>>
>> On 11/29/12 4:22 AM, "Claus Ibsen" <[email protected]> wrote:
>>
>> >oldExchange is null on the 1st call.
>> >
>> >Maybe you completion triggers because there is only 1 exchange in the
>> >batch.
>> >
>> >
>> >On Thu, Nov 29, 2012 at 12:09 PM, Jason Chaffee
>><[email protected]>
>> >wrote:
>> >> I have a custom aggregator strategy but for some reason the
>>oldExchange
>> >>is always  null.  Any ideas?
>> >>
>> >>
>> >> Here is my route.
>> >>
>> >>     from("seda:Split")
>> >>       .routeId("Split")
>> >>       .aggregate(new MyAggregationStrategy())
>> >>         .constant(true)
>> >>         .completionFromBatchConsumer()
>> >>
>> >>.completionPredicate(header("CamelBatchComplete").isEqualTo(true))
>> >>       .to("file://./target/?fileName=aggregated.xml")
>> >>
>> >>
>> >> Here is my AggregationStrategy:
>> >>
>> >>     @Override
>> >>     public Exchange aggregate(final Exchange oldExchange, final
>> >>Exchange newExchange) {
>> >>         MyObjects c = new MyObjects();
>> >>
>> >>         if (oldExchange != null) {
>> >>             C = oldExchange.getIn().getBody(MyObjects.class);
>> >>         }
>> >>
>> >>         final Message newIn = newExchange.getIn();
>> >>         final MyObject myObject=
>> >>newExchange.getIn().getBody(MyObject.class);
>> >>
>> >>         c.addMyObject(myObject);
>> >>         newIn.setBody(c);
>> >>
>> >>         return newExchange;
>> >>     }
>> >
>> >
>> >
>> >--
>> >Claus Ibsen
>> >-----------------
>> >Red Hat, Inc.
>> >FuseSource is now part of Red Hat
>> >Email: [email protected]
>> >Web: http://fusesource.com
>> >Twitter: davsclaus
>> >Blog: http://davsclaus.com
>> >Author of Camel in Action: http://www.manning.com/ibsen
>> >
>>
>>
>
>
>-- 
>Charles Moulliard
>Apache Committer / Sr. Enterprise Architect (RedHat)
>Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com

Reply via email to