RecordContext — Record Metadata

RecordContext is the abstraction of record contexts that Kafka Streams developers use for dynamic routing of output records (using TopicNameExtractor) based on the metadata of a record, i.e. headers, offset, partition, timestamp, and topic.

Note
ProcessorRecordContext is the default implementation of the RecordContext Contract in Kafka Streams.
Table 1. RecordContext Contract
Method Description

headers

Headers headers()

The headers of the record

offset

long offset()

The position of the record in the corresponding Kafka partition

partition

int partition()

The partition the record has been received from

timestamp

long timestamp()

The timestamp of the record

topic

String topic()

The topic the record has been received from

results matching ""

    No results matching ""