You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Olivier.Roger" <ol...@bsb.com> on 2010/09/06 17:47:14 UTC

[Aggregator] oldExchange always null ?

Hello Camel,

I have a strange behavior with the aggregator component. After a few hours I
still cannot explains what happens.

I have an aggregator define as 

                    <aggregate strategyRef="crgAggregatorStrategy"
batchSize="3">
                        <correlationExpression>
                            <xpath>/ns:message/ns:correlation</xpath>
<!--                            <method bean="crgAggregatorStrategy"
method="correlationId" />-->
                        </correlationExpression>
                        <to ref="cbr"/>
                    </aggregate>

The xpath expression is the correct xpath expression and message have
content.
I also tried to set a constant or to use a bean returning a fix value but in
all cases the oldExchanged variable is null.

It would be great if someone could indicates where I made a mistake,

Thanks in advance,

Olivier
-- 
View this message in context: http://camel.465427.n5.nabble.com/Aggregator-oldExchange-always-null-tp2805136p2805136.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: [Aggregator] oldExchange always null ?

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Sep 7, 2010 at 8:58 AM, Olivier.Roger <ol...@bsb.com> wrote:
>
> Thanks for your help claus,
>
> I fact the issue was in the aggregationStrategy.
> I transformed the message and the correlationId was lost.
>
> Setting back the id solve the issue.

Glad you found the issue. Actually the custom code you do in the
AggregationStrategy is always a good place to start, as you have found
out you have to be a bit careful when you "merge" the result and
ensure all data is there in the returned instance.



> --
> View this message in context: http://camel.465427.n5.nabble.com/Aggregator-oldExchange-always-null-tp2805136p2805708.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: [Aggregator] oldExchange always null ?

Posted by "Olivier.Roger" <ol...@bsb.com>.
Thanks for your help claus,

I fact the issue was in the aggregationStrategy. 
I transformed the message and the correlationId was lost.

Setting back the id solve the issue.
-- 
View this message in context: http://camel.465427.n5.nabble.com/Aggregator-oldExchange-always-null-tp2805136p2805708.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: [Aggregator] oldExchange always null ?

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Sep 6, 2010 at 5:49 PM, Olivier.Roger <ol...@bsb.com> wrote:
>
> By the way, I use Camel 2.2.

Check some of the unit tests for the camel-spring v2.2 release as
there are some using the <aggregator>



> --
> View this message in context: http://camel.465427.n5.nabble.com/Aggregator-oldExchange-always-null-tp2805136p2805137.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: [Aggregator] oldExchange always null ?

Posted by "Olivier.Roger" <ol...@bsb.com>.
By the way, I use Camel 2.2.
-- 
View this message in context: http://camel.465427.n5.nabble.com/Aggregator-oldExchange-always-null-tp2805136p2805137.html
Sent from the Camel - Users mailing list archive at Nabble.com.