vitojeng commented on a change in pull request #10597:
URL: https://github.com/apache/kafka/pull/10597#discussion_r621794196



##########
File path: streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java
##########
@@ -344,7 +345,7 @@ private boolean isRunningOrRebalancing() {
 
     private void validateIsRunningOrRebalancing() {
         if (!isRunningOrRebalancing()) {
-            throw new IllegalStateException("KafkaStreams is not running. 
State is " + state + ".");
+            throw new StreamsNotStartedException("KafkaStreams is not running. 
State is " + state + ".");

Review comment:
       > So from a user perspective you would want to catch and retry maybe on 
StreamsNotStartedException, but IllegalStateException maybe even should in fact 
kill the app so it can be restarted (eg k8s restarts the process/pod).
   
   Totally agree, sorry that I didn't point out this before. The user can just 
catch and retry when StreamsNotStartedException thrown. This is different from 
IllegalStateException. I don't think we need introduce another exception.
   
   So I'm +1 on (c).




-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to