guozhangwang commented on a change in pull request #11499: URL: https://github.com/apache/kafka/pull/11499#discussion_r749758167
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/Task.java ########## @@ -246,4 +246,11 @@ default boolean commitRequested() { * @return This returns the time the task started idling. If it is not idling it returns empty. */ Optional<Long> timeCurrentIdlingStarted(); + + /** + * Gets the exception that caused the failure of the task. + * + * @return exception that caused the failure of the task + */ + Optional<RuntimeException> getException(); Review comment: I think we can narrow down the scope of this exception, if it is only going to be used during restoration time. But nevertheless we can discuss about this later. -- 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