org.apache.camel.processor
Class Aggregator
java.lang.Object
org.apache.camel.impl.ServiceSupport
org.apache.camel.processor.BatchProcessor
org.apache.camel.processor.Aggregator
- All Implemented Interfaces:
- Runnable, Service
public class Aggregator
- extends BatchProcessor
An implementation of the Aggregator
pattern where a batch of messages are processed (up to a maximum amount or
until some timeout is reached) and messages for the same correlation key are
combined together using some kind of
{@link AggregationStrategy ) (by default the latest message is used) to compress
many message exchanges * into a smaller number of exchanges.
A good
example of this is stock market data; you may be receiving 30,000
messages/second and you may want to throttle it right down so that multiple
messages for the same stock are combined (or just the latest message is used
and older prices are discarded). Another idea is to combine line item
messages together into a single invoice message.
- Version:
- $Revision: 1.1 $
Methods inherited from class org.apache.camel.processor.BatchProcessor |
doStart, doStop, getBatchSize, getBatchTimeout, getCollection, getEndpoint, getExceptionHandler, getProcessor, processBatch, processExchange, run, setBatchSize, setBatchTimeout, setExceptionHandler |
Aggregator
public Aggregator(Endpoint endpoint,
Processor processor,
Expression correlationExpression,
AggregationStrategy aggregationStrategy)
Aggregator
public Aggregator(Endpoint endpoint,
Processor processor,
AggregationCollection collection)
toString
public String toString()
- Overrides:
toString
in class BatchProcessor
Copyright © 2007 Apache Software Foundation. All Rights Reserved.