Class FanOutKinesisShardSubscription


  • @Internal
    public class FanOutKinesisShardSubscription
    extends Object
    FanOutSubscription class responsible for handling the subscription to a single shard of the Kinesis stream. Given a shardId, it will manage the lifecycle of the subscription, and eagerly keep the next batch of records available for consumption when next polled.
    • Constructor Detail

    • Method Detail

      • activateSubscription

        public void activateSubscription()
        Method to allow eager activation of the subscription.
      • nextEvent

        public software.amazon.awssdk.services.kinesis.model.SubscribeToShardEvent nextEvent()
        This is the main entrypoint for this subscription class. It will retrieve the next batch of records from the Kinesis stream shard. It will throw any unrecoverable exceptions encountered during the subscription process.
        Returns:
        next FanOut subscription event containing records. Returns null if subscription is not yet active and fetching should be retried at a later time.