prorm API Reference
    Preparing search index...

    Class KinesisStore

    KinesisStore wraps an AWS v3 KinesisClient and exposes stream producing, a shard-iterator consumer loop, and stream administration.

    Implements

    Index
    name: "kinesis" = 'kinesis'

    The name of the store (e.g. 'mongodb', 'redis', 'dynamodb')

    library: "@aws-sdk/client-kinesis" = '@aws-sdk/client-kinesis'

    The client library being used

    • PutRecord — publish one message to stream. The message is encoded to bytes (string → UTF-8, Buffer → as-is, else JSON). Returns the shard id and sequence number assigned by Kinesis.

      Parameters

      • stream: string
      • message: KinesisMessage
      • options: PutRecordOptions = {}

      Returns Promise<PutRecordResult>

    • CreateStream — provision a new stream.

      Parameters

      • name: string
      • options: CreateStreamOptions = {}

      Returns Promise<void>

    • Alias for createStream(), matching the common store surface.

      Parameters

      • name: string
      • options: CreateStreamOptions = {}

      Returns Promise<void>

    • Subscribe to stream: acquire a shard iterator (GetShardIterator) and poll GetRecords in a loop, invoking handler once per record. Returns a subscription whose stop() ends the loop; the subscription is also tracked so disconnect() stops it. The poll loop runs detached (not awaited); this method resolves once the initial iterator is acquired.

      Parameters

      • stream: string
      • handler: (record: any) => void | Promise<void>
      • options: KinesisSubscribeOptions = {}

      Returns Promise<KinesisSubscription>