davidradl commented on code in PR #245:
URL: 
https://github.com/apache/flink-connector-aws/pull/245#discussion_r3187779800


##########
flink-connector-aws/flink-connector-aws-kinesis-streams/src/main/java/org/apache/flink/connector/kinesis/source/reader/fanout/FanOutKinesisShardSubscription.java:
##########
@@ -330,8 +379,14 @@ public void onError(Throwable throwable) {
         @Override
         public void onComplete() {
             LOG.info("Subscription complete - {} ({})", shardId, consumerArn);
-            cancel();
-            activateSubscription();
+            this.subscriptionState.set(SubscriptionState.COMPLETED);
         }
     }
+
+    /** States that the {@code FanOutShardSubscriber} may be in. */
+    private enum SubscriptionState {
+        NOT_STARTED,
+        SUBSCRIBED,
+        COMPLETED

Review Comment:
   can there be an error state?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to