public class WallclockTimestampExtractor extends Object implements TimestampExtractor
System.currentTimeMillis()
.
Using this extractor effectively provides processing-time semantics.
If you need event-time semantics, use ConsumerRecordTimestampExtractor
with
built-in CreateTime or LogAppendTime timestamp (see KIP-32: Add timestamps to Kafka message for details).Constructor and Description |
---|
WallclockTimestampExtractor() |
Modifier and Type | Method and Description |
---|---|
long |
extract(ConsumerRecord<Object,Object> record)
Return the current wall clock time as timestamp.
|
public long extract(ConsumerRecord<Object,Object> record)
extract
in interface TimestampExtractor
record
- a data record