loicgreffier commented on code in PR #18739: URL: https://github.com/apache/kafka/pull/18739#discussion_r2125005325
########## streams/src/main/java/org/apache/kafka/streams/processor/RecordContext.java: ########## @@ -110,4 +110,37 @@ public interface RecordContext { */ Headers headers(); + /** + * Return the non-deserialized byte[] of the input message key if the context has been triggered by a message. + * + * <p> 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, it will return null. Review Comment: Fixed ########## streams/src/main/java/org/apache/kafka/streams/processor/RecordContext.java: ########## @@ -110,4 +110,37 @@ public interface RecordContext { */ Headers headers(); + /** + * Return the non-deserialized byte[] of the input message key if the context has been triggered by a message. + * + * <p> 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, it will return null. + * + * <p> If this method is invoked in a sub-topology due to a repartition, the returned key would be one sent + * to the repartition topic. + * + * <p> Always returns null if this method is invoked within a + * ProductionExceptionHandler.handle(ErrorHandlerContext, ProducerRecord, Exception) + * + * @return the raw byte of the key of the source message + */ + byte[] sourceRawKey(); + + /** + * Return the non-deserialized byte[] of the input message value if the context has been triggered by a message. + * + * <p> 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, it will return null. Review Comment: Fixed -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org