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


##########
flink-connector-aws/flink-connector-aws-kinesis-streams/src/main/java/org/apache/flink/connector/kinesis/source/reader/fanout/FanOutKinesisShardSubscription.java:
##########
@@ -236,16 +236,37 @@ public SubscribeToShardEvent nextEvent() {
             throw new KinesisStreamsSourceException(
                     "Subscription encountered unrecoverable exception.", 
throwable);
         }
+        final SubscriptionState state =
+                Optional.ofNullable(shardSubscriber)
+                        .map(FanOutShardSubscriber::getSubscriptionState)
+                        .orElse(SubscriptionState.NOT_STARTED);
 
-        if (!subscriptionActive.get()) {
-            LOG.debug(
-                    "Subscription to shard {} for consumer {} is not yet 
active. Skipping.",
-                    shardId,
-                    consumerArn);
-            return null;
+        switch (state) {
+            case NOT_STARTED:
+                LOG.debug(

Review Comment:
   I suggest enclosing the log entries with the if `LOG.ifDebugEnabled( `check 
same for infos.



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