Skip to content

Latest commit

 

History

History
65 lines (46 loc) · 1.37 KB

kafka-streams-RecordContext.adoc

File metadata and controls

65 lines (46 loc) · 1.37 KB

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