camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From breilhes <breil...@voila.fr>
Subject Bug with completionSize on AggregatorProcessor
Date Fri, 11 Jan 2013 10:34:52 GMT
Hi,

related topic :
http://camel.465427.n5.nabble.com/Bug-with-completionSize-on-AggregatorProcessor-td5721307.html

I've tested the bug correction (CAMEL-5720) on version 2.10.3 and there is a
regression. If completionSizeExpression is activated and not completed, you
return null and the completionTimeout is never tested.

You should replace code with above lines in method
protected String isCompleted(String key, Exchange exchange) 


boolean completionSizeExpressionChecked = false;
if (getCompletionSizeExpression() != null) {
     Integer value = getCompletionSizeExpression().evaluate(exchange,
Integer.class);
     if (value != null && value > 0) {
         completionSizeExpressionChecked  = true;
         int size = exchange.getProperty(Exchange.AGGREGATED_SIZE, 1,
Integer.class);
         if (size >= value) {
              return "size";
         }
      }
 }

if (!completionSizeExpressionChecked  && getCompletionSize() > 0) {
     int size = exchange.getProperty(Exchange.AGGREGATED_SIZE, 1,
Integer.class);
     if (size >= getCompletionSize()) {
         return "size";
     }
}

Regards,




--
View this message in context: http://camel.465427.n5.nabble.com/Bug-with-completionSize-on-AggregatorProcessor-tp5725364.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message