Versions Compared

Key

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

...

org.apache.kafka.streams.kstream.Transformer
org.apache.kafka.streams.kstream.ValueTransformer

 

Terminology

Term
Description
Stream partition time

The value returned by the TimestampExtractor implementation in use or -1 if there haven't been any messages received for that partition.

This can be the record timestamp, wall-clock time or any other notion of time defined by the user. However, as per the API doc, the extracted timestamp MUST represent the milliseconds since midnight, January 1, 1970 UTC. Please note that currently the TimestampExtractor is global to the KafkaStreams instance but after KIP-123 the extractor will be per source allowing multiple different extractors within a topology.

Stream timeDefined as the smallest among all its input stream partition timestamps (-1 if any of the partition hasn't received messages)
Punctuate timeReference time used to trigger the Punctuate calls, currently the stream time.
Punctuate's timestamp argumentCurrently the stream time when this method is being called
Punctuate's output record timeRecord timestamp for records returned by Transformer.punctuate or generated from punctuate via ProcessorContext.forward. Currently the stream time.

...

The proposal is to deprecate the current punctuate() method on Processor, Transformer and ValueTransformer interfaces:

Code Block
titleProcessor<K,V>
@Deprecated
void punctuate(long timestamp); // current

...

  • Processor.punctuate(long timestamp),
  • Transformer.punctuate(long timestamp),
  • ValueTransformer.punctuate(long timestamp),
  • ProcessorContext.schedule(long interval);

...