If I use the following
from("direct:items")
.aggregate(header(*"id"*), myAggregationStrategy)
.completionTimeout(500)
.to("direct:send-to-A");
I am getting invalid correlation id error.
Regards,
Prasad
On Mon, Mar 27, 2017 at 2:42 PM, Claus Ibsen <[email protected]> wrote:
> Your use the file name as aggregrate expression and therefore its
> grouping per file name and so file a.txt and b.txt do not group
> together.
>
> And you get aggregate with old exchange as null when a new group is started
>
> On Mon, Mar 27, 2017 at 10:49 AM, Ambika Das
> <[email protected]> wrote:
> > Hi,
> >
> > I am aggregating contents of a csv file. the csv file can contain rows
> with
> > same e mail id. For those lines I need to generate a combined JSON with
> > contents aggregated.
> >
> > I am using PreCompletionAwareAggregationStrategy and my aggregate method
> > looks like this.
> >
> > if (oldExchange == null) {
> > return false;
> > }
> >
> > // Code for matching e mail id goes here
> >
> > //merges application data with old exchange
> >
> > return oldExchange;
> >
> > My route builder looks like this
> >
> > from("direct:items")
> > .aggregate(header(FILE_NAME_ONLY), myAggregationStrategy)
> > .completionTimeout(500)
> > .to("direct:send-to-A");
> >
> >
> > From the posts I came to know that we need to set an index to the
> > header, but not sure how it
> >
> > works.
> >
> >
> > Every time my old exchange comes null so code after old exchange block
> > never gets executed.
> >
> > Thanks,
> >
> > Prasad
> >
> > --
> >
> > ------------ Our Legal Fees At Work -----------------------------------
> > This communication and its contents are confidential and may contain
> > protected intellectual property or other information protected from
> > disclosure. If you are not the intended recipient you may not read, copy,
> > distribute or use this information. If you have received this
> > communication or its contents in error, please notify Symphony Talent
> > immediately by replying to this message and then delete this
> communication
> > and its contents from your system.
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>
--
------------ Our Legal Fees At Work -----------------------------------
This communication and its contents are confidential and may contain
protected intellectual property or other information protected from
disclosure. If you are not the intended recipient you may not read, copy,
distribute or use this information. If you have received this
communication or its contents in error, please notify Symphony Talent
immediately by replying to this message and then delete this communication
and its contents from your system.