Skip to content

TimestampExtractor

TimestampExtractor is an abstraction of time extractors that Kafka Streams uses to extract a timestamp from a record.

TimestampExtractor can be configured as follows:

  1. For SourceNodes using Topology.addSource and Topology.addGlobalStore
  2. Application-wide using default.timestamp.extractor configuration property

Contract

Extracting Timestamp

long extract(
  ConsumerRecord<Object, Object> record,
  long partitionTime)

Extracts a timestamp from the given ConsumerRecord (Apache Kafka)

Used when:

Implementations

Back to top