[ https://issues.apache.org/jira/browse/KAFKA-9331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17003806#comment-17003806 ]
John Roesler commented on KAFKA-9331: ------------------------------------- I could get behind this because the current behavior seems not ideal to me. If you take a step back and consider the situation, it seems like Streams should either: * shut the entire application down (fail properly) * spawn a new thread to replace the crashed one (continue properly) What we do right now, where we just let individual threads die if they get an uncaught exception is like the worst of both worlds. I've seen several threads that confirm to me that it's not obvious how to use the current APIs to properly either shut the app down or restart it to recover. I mention all this because this ticket will require a KIP, and the KIP should be opinionated about whether Streams should "fail fast" or be resilient, and also list the alternative under "rejected alternatives". > Add option to terminate application when StreamThread(s) die > ------------------------------------------------------------ > > Key: KAFKA-9331 > URL: https://issues.apache.org/jira/browse/KAFKA-9331 > Project: Kafka > Issue Type: Improvement > Components: streams > Affects Versions: 2.4.0 > Reporter: Michael Bingham > Priority: Minor > > Currently, if a {{StreamThread}} dies due to an unexpected exception, the > Streams application continues running. Even if all {{StreamThread}}s die, the > application will continue running, but will be in an {{ERROR}} state. > Many users want or expect the application to terminate in the event of a > fatal exception that kills one or more {{StreamThread}}s. Currently, this > requires extra work from the developer to register an uncaught exception > handler on the {{KafkaStreams}} object and trigger a shutdown as needed. > It would be useful to provide a configurable option for the Streams > application to have it automatically terminate with an exception if one or > more {{StreamThread}}(s) die. > > -- This message was sent by Atlassian Jira (v8.3.4#803005)