You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by mta38 <mt...@orange-ftgroup.com> on 2008/10/30 13:30:24 UTC

Aggregator execution and timeout value

Hi all,

I have a question about aggregator behaviour and wish someone would help me.

Suppose my aggregationStrategy aggregate function is like that:

Class MyaggregationStrategy implements AggregationStrategy {

public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {

		.. some longer process on oldExchange and newExchange…
	}

	…
}

What happened if during aggregate function execution, because of timeout (of
the aggregator) the polling of the endpoint linked to the aggregator
restart?

Did in process modification on oldExchange and/or newExchange are lost? 

Any help are welcome,
Thanks in advance.
mta38

-- 
View this message in context: http://www.nabble.com/Aggregator-execution-and-timeout-value-tp20245908s22882p20245908.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Aggregator execution and timeout value

Posted by Claus Ibsen <ci...@silverbullet.dk>.
Hi

The timeout check is happening after your have added the exchange, so if you take 5 seconds to add the exchange, then Camel will check the timeout on next loop (BatchProcessor). So you should be home free, and not lose any messages ;)

See the source BatchProcessor.


However the default batch timeout is *only* 1 sec. So you should be fast to aggregate ;). I think most people must set a timeout value that fits their use-case.





Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: mta38 [mailto:mtaraud.ext@orange-ftgroup.com] 
Sent: 30. oktober 2008 13:30
To: camel-user@activemq.apache.org
Subject: Aggregator execution and timeout value


Hi all,

I have a question about aggregator behaviour and wish someone would help me.

Suppose my aggregationStrategy aggregate function is like that:

Class MyaggregationStrategy implements AggregationStrategy {

public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {

		.. some longer process on oldExchange and newExchange...
	}

	...
}

What happened if during aggregate function execution, because of timeout (of
the aggregator) the polling of the endpoint linked to the aggregator
restart?

Did in process modification on oldExchange and/or newExchange are lost? 

Any help are welcome,
Thanks in advance.
mta38

-- 
View this message in context: http://www.nabble.com/Aggregator-execution-and-timeout-value-tp20245908s22882p20245908.html
Sent from the Camel - Users mailing list archive at Nabble.com.