camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bluewolfca <bluewol...@gmail.com>
Subject Aggregator use case ... how to accomplish individual completion intervals?
Date Tue, 20 May 2014 19:02:24 GMT
I have a use case that I need help with in the Camel Aggregator.

Timeout defines an amount of time to wait after each new message that gets
applied to a specific aggregated exchange. Different aggregations will then
accumulate for different amounts of time depending on message rep rate.

Interval defines a set period of time but applies to the global clock and
ends all aggregated exchanges when the time runs out.

What I need is an interval that applies per aggregated exchange. I have
messages coming in from different sources that need to be aggregated. With
the source ID serving as my correlation key, I need to start an aggregated
exchange that will wait for an interval of exactly 30 seconds then complete
(to account for the maximum amount of lag between associated messages). The
completion shouldn't interfere with any other in-process aggregated exchange
from a different source.

I can't assign a global interval because the sources all operate
independently of each other, but when they fire off messages they do so in
bursts then go quiet for an indeterminate amount of time. An interval could
end an aggregation prematurely. If, however, the indeterminate amount of
time actually ends up being 45 seconds later till another burst from the
same source then using completionTimeout runs into the problem of
aggregating separate bursts when the lag between messages causes the timeout
to push back too far.

How do I do this within the existing API and it's extension points? I didn't
see an obvious way. Or maybe I'm just blind. 

Thanks!
Allen





--
View this message in context: http://camel.465427.n5.nabble.com/Aggregator-use-case-how-to-accomplish-individual-completion-intervals-tp5751368.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message