Interface RecordMetadata
- 
Method SummaryModifier and TypeMethodDescriptionlongoffset()Return the offset of the current input record; could be-1if it is not available.intReturn the partition id of the current input record; could be-1if it is not available.topic()Return the topic name of the current input record; could benullif it is not available.
- 
Method Details- 
topicString topic()Return the topic name of the current input record; could benullif it is not available.For example, if this method is invoked within a @link Punctuator#punctuate(long) punctuation callback}, or while processing a record that was forwarded by a punctuation callback, the record won't have an associated topic. Another example is KTable.transformValues(ValueTransformerWithKeySupplier, String...)(and siblings), that do not always guarantee to provide a valid topic name, as they might be executed "out-of-band" due to some internal optimizations applied by the Kafka Streams DSL.- Returns:
- the topic name
 
- 
partitionint partition()Return the partition id of the current input record; could be-1if it is not available.For example, if this method is invoked within a @link Punctuator#punctuate(long) punctuation callback}, or while processing a record that was forwarded by a punctuation callback, the record won't have an associated partition id. Another example is KTable.transformValues(ValueTransformerWithKeySupplier, String...)(and siblings), that do not always guarantee to provide a valid partition id, as they might be executed "out-of-band" due to some internal optimizations applied by the Kafka Streams DSL.- Returns:
- the partition id
 
- 
offsetlong offset()Return the offset of the current input record; could be-1if it is not available.For example, if this method is invoked within a @link Punctuator#punctuate(long) punctuation callback}, or while processing a record that was forwarded by a punctuation callback, the record won't have an associated offset. Another example is KTable.transformValues(ValueTransformerWithKeySupplier, String...)(and siblings), that do not always guarantee to provide a valid offset, as they might be executed "out-of-band" due to some internal optimizations applied by the Kafka Streams DSL.- Returns:
- the offset
 
 
-