You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by davsclaus <ci...@yahoo.dk> on 2010/10/08 06:27:52 UTC

Re: UseOriginalAggregationStrategy in Camel 2.4

The original Exchange would be the oldExchange parameter on the very first
invocation of the AggregationStrategy.

So what you can do use to use a AggregationStrategy without extending the
UseOriginal, and just always return the oldExchange. And you can then just
add the headers from the newExchange to the oldExchange.
-- 
View this message in context: http://camel.465427.n5.nabble.com/UseOriginalAggregationStrategy-in-Camel-2-4-tp3198775p3204031.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: UseOriginalAggregationStrategy in Camel 2.4

Posted by SlavaC <ve...@edifecs.com>.

SlavaC wrote:
> 
> 
> Claus Ibsen-2 wrote:
>> 
>> On Wed, Oct 27, 2010 at 12:41 AM, SlavaC wrote:
>>>
>>>
>>> davsclaus wrote:
>>>>
>>>> The original Exchange would be the oldExchange parameter on the very
>>>> first
>>>> invocation of the AggregationStrategy.
>>>>
>>>> So what you can do use to use a AggregationStrategy without extending
>>>> the
>>>> UseOriginal, and just always return the oldExchange. And you can then
>>>> just
>>>> add the headers from the newExchange to the oldExchange.
>>>>
>>>
>>> davsclaus, thanks for the replay but seems that this doesn't work. I
>>> have a
>>> null oldExchange on the very first invocation.
>>> Seems that calling the aggregate() method with null OldExchange for the
>>> first exchange was introduced in Camel 2.0 and there is no mention of
>>> changing this in the documentation:
>>> http://camel.apache.org/aggregator.html
>>> --
>> 
>> You should *always* read the release notes
>> http://camel.apache.org/camel-200-release.html
>> 
>> 
>> -- 
>> Claus Ibsen
>> 
> 
> Reading the release notes didn't help, basically they say the same thing:
> "The aggregate method is now also invoked on the very first exchange.
> Allowing the end users to be in full power.
> At this first invocation the oldExchange parameter is null."
> 
> Thanks Claus.
> 
> 

Did anyone succeed to use a custom Aggregation Strategy in Camel 2.4 that
will propagate original headers/body?
I'm afraid will have to switch back to Camel 2.3 in case there is no
solution for it....

Thanks.
-- 
View this message in context: http://camel.465427.n5.nabble.com/UseOriginalAggregationStrategy-in-Camel-2-4-tp3198775p3261372.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: UseOriginalAggregationStrategy in Camel 2.4

Posted by SlavaC <ve...@edifecs.com>.

Claus Ibsen-2 wrote:
> 
> On Wed, Oct 27, 2010 at 12:41 AM, SlavaC wrote:
>>
>>
>> davsclaus wrote:
>>>
>>> The original Exchange would be the oldExchange parameter on the very
>>> first
>>> invocation of the AggregationStrategy.
>>>
>>> So what you can do use to use a AggregationStrategy without extending
>>> the
>>> UseOriginal, and just always return the oldExchange. And you can then
>>> just
>>> add the headers from the newExchange to the oldExchange.
>>>
>>
>> davsclaus, thanks for the replay but seems that this doesn't work. I have
>> a
>> null oldExchange on the very first invocation.
>> Seems that calling the aggregate() method with null OldExchange for the
>> first exchange was introduced in Camel 2.0 and there is no mention of
>> changing this in the documentation:
>> http://camel.apache.org/aggregator.html
>> --
> 
> You should *always* read the release notes
> http://camel.apache.org/camel-200-release.html
> 
> 
> -- 
> Claus Ibsen
> 

Reading the release notes didn't help, basically they say the same thing:
"The aggregate method is now also invoked on the very first exchange.
Allowing the end users to be in full power.
At this first invocation the oldExchange parameter is null."

Thanks Claus.

-- 
View this message in context: http://camel.465427.n5.nabble.com/UseOriginalAggregationStrategy-in-Camel-2-4-tp3198775p3242526.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: UseOriginalAggregationStrategy in Camel 2.4

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Oct 27, 2010 at 12:41 AM, SlavaC <ve...@edifecs.com> wrote:
>
>
> davsclaus wrote:
>>
>> The original Exchange would be the oldExchange parameter on the very first
>> invocation of the AggregationStrategy.
>>
>> So what you can do use to use a AggregationStrategy without extending the
>> UseOriginal, and just always return the oldExchange. And you can then just
>> add the headers from the newExchange to the oldExchange.
>>
>
> davsclaus, thanks for the replay but seems that this doesn't work. I have a
> null oldExchange on the very first invocation.
> Seems that calling the aggregate() method with null OldExchange for the
> first exchange was introduced in Camel 2.0 and there is no mention of
> changing this in the documentation: http://camel.apache.org/aggregator.html
> --

You should *always* read the release notes
http://camel.apache.org/camel-200-release.html


> View this message in context: http://camel.465427.n5.nabble.com/UseOriginalAggregationStrategy-in-Camel-2-4-tp3198775p3237913.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: UseOriginalAggregationStrategy in Camel 2.4

Posted by SlavaC <ve...@edifecs.com>.

davsclaus wrote:
> 
> The original Exchange would be the oldExchange parameter on the very first
> invocation of the AggregationStrategy.
> 
> So what you can do use to use a AggregationStrategy without extending the
> UseOriginal, and just always return the oldExchange. And you can then just
> add the headers from the newExchange to the oldExchange.
> 

davsclaus, thanks for the replay but seems that this doesn't work. I have a
null oldExchange on the very first invocation. 
Seems that calling the aggregate() method with null OldExchange for the
first exchange was introduced in Camel 2.0 and there is no mention of
changing this in the documentation: http://camel.apache.org/aggregator.html
-- 
View this message in context: http://camel.465427.n5.nabble.com/UseOriginalAggregationStrategy-in-Camel-2-4-tp3198775p3237913.html
Sent from the Camel - Users mailing list archive at Nabble.com.