Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For example, imagine a stock market data system; you are receiving 30,000 messages per second; you may want to throttle down the updates as, say, a GUI cannot cope with such massive update rates. So you may want to aggregate these messages together so that within a window (defined by a maximum number of messages or a timeout), messages for the same stock are aggregated together; by just choosing the latest message and discarding the older prices. (You could apply a delta processing algorithm if you prefer to capture some of the history).

Tip
titlUsing the aggregator correctly

Torsen Mielke wrote a nice blog entry with his thoughts and experience on using the aggreagator. Its a well worth read.

Using the Fluent Builders

The following example shows how to aggregate messages so that only the latest message for a specific value of the cheese header are sent.

...