camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scisci <ferioli.mi...@gmail.com>
Subject AggregatinStrategy on split never stop
Date Mon, 16 Nov 2015 08:14:11 GMT
Hi,
I've a problem with a split and custom aggregationStrateqy.
I've to count the items that were split.
This in my AggreagationSt egy

public class Item_AggregationStrategy implements AggregationStrategy{
	
	private static final Logger LOGGER =
Logger.getLogger(Item_AggregationStrategy.class);
	

	@Override
	public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
		LOGGER.info("Sono in Item_AggregationStrategy");
		
		 if (oldExchange == null) 
		 {
	            return newExchange;
	     }
		 
		
		Integer numero_items = oldExchange.getIn().getHeader("Numero_Items",
Integer.class);
		LOGGER.info("Numero Items: " + numero_items);
		numero_items++;
		LOGGER.info("Numero Items 2: " + numero_items);
		
		newExchange.getIn().setHeader("Numero_Items", numero_items);
		
		return newExchange;
	}

and this is part of my route:

<process ref="Cancellazione_Tabelle"/>
 				<split streaming="true" strategyRef="Item_Aggregator" >-->
					<tokenize token="Item" xml="true"
inheritNamespaceTagName="ag_01:Accpos"/>
					<to uri="direct:Convert_Accpos"/>
        		</split>
        		<log message="Numero_Items dopo lo split:
${header.Numero_Items}"/>

it's look like tha the aggregator never end...
How to set a timeout like completionTimeout on aggregator ?

Thanks
Mirko




--
View this message in context: http://camel.465427.n5.nabble.com/AggregatinStrategy-on-split-never-stop-tp5773905.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message