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. |
Method | Description |
---|---|
|
Headers headers() The headers of the record |
|
long offset() The position of the record in the corresponding Kafka partition |
|
int partition() The partition the record has been received from |
|
long timestamp() The timestamp of the record |
|
String topic() The topic the record has been received from |