Class KinesisStreamProxy

    • Constructor Detail

      • KinesisStreamProxy

        public KinesisStreamProxy​(software.amazon.awssdk.services.kinesis.KinesisClient kinesisClient,
                                  software.amazon.awssdk.http.SdkHttpClient httpClient)
    • Method Detail

      • listShards

        public List<software.amazon.awssdk.services.kinesis.model.Shard> listShards​(String streamArn,
                                                                                    @Nullable
                                                                                    String lastSeenShardId)
        Description copied from interface: StreamProxy
        Obtains the shards associated with a given stream.
        Specified by:
        listShards in interface StreamProxy
        Parameters:
        streamArn - the ARN of the stream
        lastSeenShardId - the last seen shard Id. Used for reducing the number of results returned.
        Returns:
        shard list
      • getRecords

        public software.amazon.awssdk.services.kinesis.model.GetRecordsResponse getRecords​(String streamArn,
                                                                                           String shardId,
                                                                                           StartingPosition startingPosition)
        Description copied from interface: StreamProxy
        Retrieves records from the stream.
        Specified by:
        getRecords in interface StreamProxy
        Parameters:
        streamArn - the ARN of the stream
        shardId - the shard to subscribe from
        startingPosition - the starting position to read from
        Returns:
        the response with records. Includes both the returned records and the subsequent shard iterator to use.