ExtractRecordMetadataTimestamp

ExtractRecordMetadataTimestamp is the base of TimestampExtractors that use an onInvalidTimestamp error handler when a record has a negative (invalid) timestamp value (while extracting embedded metadata timestamps from Kafka messages).

package org.apache.kafka.streams.processor;

abstract class ExtractRecordMetadataTimestamp implements TimestampExtractor {
  // only required methods that have no implementation
  // the others follow
  abstract long onInvalidTimestamp(
    final ConsumerRecord<Object, Object> record,
    final long recordTimestamp,
    final long previousTimestamp);
}
Note
ExtractRecordMetadataTimestamp is an Evolving contract which means that compatibility may be broken at a minor release.
Table 1. ExtractRecordMetadataTimestamp Contract
Method Description

onInvalidTimestamp

Used when…​FIXME

Table 2. ExtractRecordMetadataTimestamps
ExtractRecordMetadataTimestamp Description

FailOnInvalidTimestamp

UsePreviousTimeOnInvalidTimestamp

LogAndSkipOnInvalidTimestamp

extract Method

long extract(final ConsumerRecord<Object, Object> record, final long previousTimestamp)
Note
extract is part of TimestampExtractor Contract to extract a timestamp from a record.

extract…​FIXME

results matching ""

    No results matching ""