Helper classes for the AWS v3 SDK for JS Kinesis Client (@aws-sdk/client-kinesis
).
KinesisRetrier
will retry failed records with a "successful" PutRecordsCommand
that has items marked as failed within the response, which then need to be retried.
KinesisBackgroundWriter
will accept writes immediately if there is a concurrent writer slot available, and will block the caller until a slot becomes available if all slots are in use.
The package is available on npm as @shutterstock/kinesis-helpers
npm i @shutterstock/kinesis-helpers
import { KinesisBackgroundWriter, KinesisRetrier } from '@shutterstock/kinesis-helpers';
After installing the package, you might want to look at our API Documentation to learn about all the features available.
nvm use
npm i
npm run build
npm run lint
npm run test
aws kinesis create-stream --stream-name kinesis-helpers-test-stream --shard-count 1
kinesis-helpers-test-stream
npm run example:kinesis-retrier
KINESIS_STREAM_NAME=my-stream-name npm run example:kinesis-retrier
aws kinesis create-stream --stream-name kinesis-helpers-test-stream --shard-count 1
kinesis-helpers-test-stream
npm run example:kinesis-background-writer
KINESIS_STREAM_NAME=my-stream-name npm run example:kinesis-background-writer
Generated using TypeDoc