loicgreffier commented on code in PR #18739: URL: https://github.com/apache/kafka/pull/18739#discussion_r2125010510
########## 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) Review Comment: Only `ErrorHandlerContext` is given to the `ProductionExceptionHandler#handle`, so this is a bad c&p. I've updated both code and KIP -- 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