pelaezryan commented on PR #247:
URL: 
https://github.com/apache/flink-connector-aws/pull/247#issuecomment-4434990097

   We have the following in fetchrecords. Should we be checking the 
subscription is closed as well for removing the subscription? There's no way to 
recover from a ``closed`` subscription without recreating the 
``FanOutKinesisShardSubscription``
   
   ```
       @Override
       protected RecordBatch fetchRecords(KinesisShardSplitState splitState) {
           FanOutKinesisShardSubscription subscription =
                   splitSubscriptions.get(splitState.getShardId());
   
           SubscribeToShardEvent event = subscription.nextEvent();
           if (event == null) {
               return null;
           }
   
           boolean shardCompleted = event.continuationSequenceNumber() == null;
           if (shardCompleted) {
               splitSubscriptions.remove(splitState.getShardId());
           }
           return new RecordBatch(event.records(), event.millisBehindLatest(), 
shardCompleted);
       }
   ```


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