Skip to content


KStreamAggregateProcessor is an AbstractProcessor of KStreamAggregate.

Creating Instance

KStreamAggregateProcessor takes no arguments to be created.

KStreamAggregateProcessor is created when:

  • KStreamAggregate is requested for a Processor


KStreamAggregateProcessor is a private class of KStreamAggregate and so have access to the internal properties (e.g. state name) thereof.


KStreamAggregateProcessor looks up a TimestampedKeyValueStore by the name given when the owning KStreamAggregate was created.

The TimestampedKeyValueStore is used for the following:


KStreamAggregateProcessor creates a new TimestampedTupleForwarder when created.

The TimestampedTupleForwarder is used when processing a record.


void init(
  ProcessorContext context)


init is part of the AbstractProcessor abstraction.

Processing Record

void process(
  K key, 
  V value)

process requests the TimestampedKeyValueStore for the value for the input key (that gives a ValueAndTimestamp if found).

With no previous value found, process requests the parent's Initializer for the initial value and the ProcessorContext for the timestamp.

process requests the parent's Aggregator for a new aggregate for the input key and value (and the previous or newly-created aggregation).

process creates a new ValueAndTimestamp with the new aggregate and the timestamp and requests the TimestampedKeyValueStore to store it (for the key).

In the end, process requests the TimestampedTupleForwarder to maybeForward.

process is part of the AbstractProcessor abstraction.

Back to top