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/07 09:30:56 UTC

[Aggregator] completionPredicate evaluated only once ?

Hello,

I still have some issues with the aggregator component.
According to my tests the completionPredicate is evaluated only once the
first message is received.

After that the method is not executed anymore.
Is there anything that could provoke this behaviour ?

I put here under the trace of my test

running aggregate method
old Exchange: null
new Exchange: Exchange[Message: <ns:message xml ...
running isCompleted method
old Exchange: Exchange[Message: generic message ...
new Exchange: Exchange[Message: <ns:message xml ...
running aggregate method
old Exchange: Exchange[Message: generic message ...
new Exchange: Exchange[Message: <ns:message xml ...
running aggregate method
old Exchange: Exchange[Message: generic message ...
new Exchange: Exchange[Message: <ns:message xml ...

-- 
View this message in context: http://camel.465427.n5.nabble.com/Aggregator-completionPredicate-evaluated-only-once-tp2805740p2805740.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: [Aggregator] completionPredicate evaluated only once ?

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Sep 13, 2010 at 11:35 AM, Olivier.Roger <ol...@bsb.com> wrote:
>
> I finally switched to Camel 2.4.
>
> The completionPredicate is working just like you said.
> Thanks

Great that it works for you now. And I hope you didn't have any other
"hickup" upgrading to Camel 2.4.


> --
> View this message in context: http://camel.465427.n5.nabble.com/Aggregator-completionPredicate-evaluated-only-once-tp2805740p2837484.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] completionPredicate evaluated only once ?

Posted by "Olivier.Roger" <ol...@bsb.com>.
I finally switched to Camel 2.4.

The completionPredicate is working just like you said.
Thanks
-- 
View this message in context: http://camel.465427.n5.nabble.com/Aggregator-completionPredicate-evaluated-only-once-tp2805740p2837484.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: [Aggregator] completionPredicate evaluated only once ?

Posted by "Olivier.Roger" <ol...@bsb.com>.
I see,

That explains my observations.
I will switch to 2.3+ as soon a possible.

Thanks for your explanations on this matter
-- 
View this message in context: http://camel.465427.n5.nabble.com/Aggregator-completionPredicate-evaluated-only-once-tp2805740p2805774.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: [Aggregator] completionPredicate evaluated only once ?

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Sep 7, 2010 at 9:57 AM, Olivier.Roger <ol...@bsb.com> wrote:
>
> I see.
>
> Unfortunately, I am stuck with 2.2 at the moment.
> It there any known issue with the completionPredicate in version below 2.3 ?
>

You cannot mix and match the different completion options (eg batch,
timeout, predicate) etc. in 2.2 or older.
And the completion predicate is only fired once, eg when the batch is
about to be send out.
And there is no workaround in 2.2 or older. You gotta live with it as it is.


In 2.3 onwards the conditions is evaluated on-the-fly when a new
messages arrives.
And it support persistent store and whatnot.


> Thank for your help,
>
> Olivier
> --
> View this message in context: http://camel.465427.n5.nabble.com/Aggregator-completionPredicate-evaluated-only-once-tp2805740p2805769.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] completionPredicate evaluated only once ?

Posted by "Olivier.Roger" <ol...@bsb.com>.
I see.

Unfortunately, I am stuck with 2.2 at the moment.
It there any known issue with the completionPredicate in version below 2.3 ?

Thank for your help,

Olivier
-- 
View this message in context: http://camel.465427.n5.nabble.com/Aggregator-completionPredicate-evaluated-only-once-tp2805740p2805769.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: [Aggregator] completionPredicate evaluated only once ?

Posted by Claus Ibsen <cl...@gmail.com>.
The Aggregator have been overhauled in Camel 2.3 onwards and its better.
http://camel.apache.org/aggregator2

So if possible upgrade to Camel 2.4.


On Tue, Sep 7, 2010 at 9:30 AM, Olivier.Roger <ol...@bsb.com> wrote:
>
> Hello,
>
> I still have some issues with the aggregator component.
> According to my tests the completionPredicate is evaluated only once the
> first message is received.
>
> After that the method is not executed anymore.
> Is there anything that could provoke this behaviour ?
>
> I put here under the trace of my test
>
> running aggregate method
> old Exchange: null
> new Exchange: Exchange[Message: <ns:message xml ...
> running isCompleted method
> old Exchange: Exchange[Message: generic message ...
> new Exchange: Exchange[Message: <ns:message xml ...
> running aggregate method
> old Exchange: Exchange[Message: generic message ...
> new Exchange: Exchange[Message: <ns:message xml ...
> running aggregate method
> old Exchange: Exchange[Message: generic message ...
> new Exchange: Exchange[Message: <ns:message xml ...
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Aggregator-completionPredicate-evaluated-only-once-tp2805740p2805740.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