sebastienviale commented on code in PR #17054: URL: https://github.com/apache/kafka/pull/17054#discussion_r1741651812
########## streams/src/main/java/org/apache/kafka/streams/errors/ErrorHandlerContext.java: ########## @@ -102,4 +106,23 @@ public interface ErrorHandlerContext { * @return the task ID */ TaskId taskId(); + + /** + * Return the current timestamp. + * + * <p> If it is triggered while processing a record streamed from the source processor, + * timestamp is defined as the timestamp of the current input record; the timestamp is extracted from + * {@link org.apache.kafka.clients.consumer.ConsumerRecord ConsumerRecord} by {@link TimestampExtractor}. + * Note, that an upstream {@link org.apache.kafka.streams.processor.api.Processor} might have set a new timestamp by calling + * {@link ProcessorContext#forward(Object, Object, To) forward(..., To.all().withTimestamp(...))}. + * In particular, some Kafka Streams DSL operators set result record timestamps explicitly, + * to guarantee deterministic results. + * + * <p> If it is triggered while processing a record generated not from the source processor (for example, + * if this method is invoked from the punctuate call), timestamp is defined as the current + * task's stream time, which is defined as the largest timestamp of any record processed by the task. Review Comment: > Did you copy this from `RecordContext#timestamp` JavaDocs? They might also need an update covering the wall-clock time case? > > Overall, it seems there is no difference between old and new PAPI though? Indeed, I have copied the java doc. If comments on the ErrorHandlerContext are good for you, do I have to change it with the new API and add the wall clock time part ? -- 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