Event aggregation

Aggregation is a mechanism that allows two or more events that are raised to be merged into one for more efficient processing.

Events raised during execution of an FTM application usually contain multiple pieces of context data that provide detailed information about the context in which the event was raised. For example, the event E_MpInTxnMapped normally includes information to identify the transaction, transmission, and batch for which the event applies. When many events are raised together, they often contain the same information with just one or two context values being different.

For two or more events to be aggregated, one or more pieces of context data must be marked as aggregatable in the event metadata (for example, modeled definition), and all non aggregatable context data must have the same value.

As an example, the following three events (on the left) in the following figure can be transformed into a single event (on the right):

Figure 1. Example of event aggregation
EventAggregation.jpg

The specification of whether or not a context data element can be aggregated is seen in the EVENT_EXP_CONTEXT table. The aggregation threshold is defined on an event basis; this information can be found in the EVENT_TYPE table.

Both details should be defined during FSM design.

Note: Good aggregation within an application is crucial to maximizing transaction processing throughput and reducing CPU usage.