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:
- For SourceNodes using Topology.addSource and Topology.addGlobalStore
- 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:
RecordQueue
is requested to update the head record
Implementations¶
- ExtractRecordMetadataTimestamp
WallclockTimestampExtractor