I think I've figured these things out.  Apparently timeout must be > 0 to take 
effect.  (Is this documented?)  Also, Exchange.AGGREGATED_COMPLETED_BY is a 
property and not a header.

-----Original Message-----
From: Shults, Benji [mailto:benji.shu...@windlogics.com] 
Sent: Tuesday, February 07, 2017 2:56 PM
To: users@camel.apache.org
Subject: RE: aggregation completion timeout == 0 problem

I am setting it.  But when I set it to 0L, the aggregation does not complete.

The second (and worse) problem is that when I set the timeout header to a value 
greater than 0L, the processor gets called but 

exchange.getIn().getHeader(Exchange.AGGREGATED_COMPLETED_BY, String.class);

returns null.

I would expect a value of "timeout".

Benji

-----Original Message-----
From: Claus Ibsen [mailto:claus.ib...@gmail.com]
Sent: Tuesday, February 07, 2017 2:41 PM
To: users@camel.apache.org
Subject: Re: aggregation completion timeout == 0 problem

CAUTION - EXTERNAL EMAIL



Set the timeout to a default value

 and then you can use that header to override if it has a value or not.
See the table in the doc: http://camel.apache.org/aggregator2

On Tue, Feb 7, 2017 at 9:24 PM, Shults, Benji <benji.shu...@windlogics.com> 
wrote:
> Camel version 2.18.1.
>
> I've got an aggregation route that consumes from a JMS queue.
>
>         from(createFromUri())
>                 .routeId(RouteId.NOTIFICATION_AGGREGATOR.getId())
>                 .aggregate(header(JmsProperty.JMSXGroupID.getPropertyName()), 
> aggregationStrategy)
>                 
> .completionTimeout(header(JmsProperty.TIMEOUT_MILLIS.getPropertyName()))
>                 .process(processor);
>
> The value of the JmsProperty.TIMEOUT_MILLIS.getPropertyName() header 
> is 0L.  (I can see this from logging that occurs in the preComplete 
> method in the PreCompletionAwareAggregationStrategy.)
>
> However, my processor never gets called.
>
> What further code do you need to see?
>
> Benji
>
> Benji Shults PhD | Principal Software Development Engineer WindLogics
> | 1021 Bandana Blvd E Suite 111 | St. Paul, MN  55108
> (W) 651 556 4227 | (C) 763 772 2899
>
>
> ________________________________
>
> CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the 
> intended recipient(s) and may contain confidential and privileged 
> information. Any unauthorized review, use, disclosure or distribution of any 
> kind is strictly prohibited. If you are not the intended recipient, please 
> contact the sender via reply e-mail and destroy all copies of the original 
> message. Thank you.



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to