Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

lifion-kinesis

lifion6kMIT1.3.3

Lifion client for Amazon Kinesis Data streams

adp, amazon, api, aws, big data, client, core, kinesis, lifion

readme

lifion-kinesis

npm version

Lifion's Node.js client for Amazon Kinesis Data Streams.

Getting Started

To install the module:

npm install lifion-kinesis --save

The main module export is a Kinesis class that instantiates as a readable stream.

const Kinesis = require('lifion-kinesis');

const kinesis = new Kinesis({
  streamName: 'sample-stream'
  /* other options from AWS.Kinesis */
});
kinesis.on('data', data => {
  console.log('Incoming data:', data);
});
kinesis.startConsumer();

To take advantage of back-pressure, the client can be piped to a writable stream:

const { promisify } = require('util');
const Kinesis = require('lifion-kinesis');
const stream = require('stream');

const asyncPipeline = promisify(stream.pipeline);
const kinesis = new Kinesis({
  streamName: 'sample-stream'
  /* other options from AWS.Kinesis */
});

asyncPipeline(
  kinesis,
  new stream.Writable({
    objectMode: true,
    write(data, encoding, callback) {
      console.log(data);
      callback();
    }
  })
).catch(console.error);
kinesis.startConsumer();

Features

  • Standard Node.js stream abstraction of Kinesis streams.
  • Node.js implementation of the new enhanced fan-out feature.
  • Optional auto-creation, encryption, and tagging of Kinesis streams.
  • Support for a polling mode, using the GetRecords API, with automatic checkpointing.
  • Support for multiple concurrent consumers through automatic assignment of shards.
  • Support for sending messages to streams, with auto-retries.

API Reference

Kinesis ⇐ PassThrough

A pass-through stream class specialization implementing a consumer of Kinesis Data Streams using the AWS SDK for JavaScript. Incoming data can be retrieved through either the data event or by piping the instance to other streams.

Kind: Exported class
Extends: PassThrough

new Kinesis(options)

Initializes a new instance of the Kinesis client.

Param Type Default Description
options Object | The initialization options. In addition to the below options, it can also contain any of the AWS.Kinesis options.
[options.compression] string | The kind of data compression to use with records. The currently available compression options are either "LZ-UTF8" or none.
[options.consumerGroup] string | The name of the group of consumers in which shards will be distributed and checkpoints will be shared. If not provided, it defaults to the name of the application/project using this module.
[options.createStreamIfNeeded] boolean true Whether if the Kinesis stream should be automatically created if it doesn't exist upon connection
[options.dynamoDb] Object {} The initialization options for the DynamoDB client used to store the state of the consumers. In addition to tableNames and tags, it can also contain any of the AWS.DynamoDB options.
[options.dynamoDb.tableName] string | The name of the table in which to store the state of consumers. If not provided, it defaults to "lifion-kinesis-state".
[options.dynamoDb.tags] Object | If provided, the client will ensure that the DynamoDB table where the state is stored is tagged with these tags. If the table already has tags, they will be merged.
[options.encryption] Object | The encryption options to enforce in the stream.
[options.encryption.type] string | The encryption type to use.
[options.encryption.keyId] string | The GUID for the customer-managed AWS KMS key to use for encryption. This value can be a globally unique identifier, a fully specified ARN to either an alias or a key, or an alias name prefixed by "alias/".
[options.initialPositionInStream] string "LATEST" The location in the shard from which the Consumer will start fetching records from when the application starts for the first time and there is no checkpoint for the shard. Set to LATEST to fetch new data only Set to TRIM_HORIZON to start from the oldest available data record.
[options.leaseAcquisitionInterval] number 20000 The interval in milliseconds for how often to attempt lease acquisitions.
[options.leaseAcquisitionRecoveryInterval] number 5000 The interval in milliseconds for how often to re-attempt lease acquisitions when an error is returned from aws.
[options.limit] number 10000 The limit of records per get records call (only applicable with useEnhancedFanOut is set to false)
[options.logger] Object | An object with the warn, debug, and error functions that will be used for logging purposes. If not provided, logging will be omitted.
[options.maxEnhancedConsumers] number 5 An option to set the number of enhanced fan-out consumer ARNs that the module should initialize. Defaults to 5. Providing a number above the AWS limit (20) or below 1 will result in using the default.
[options.noRecordsPollDelay] number 1000 The delay in milliseconds before attempting to get more records when there were none in the previous attempt (only applicable when useEnhancedFanOut is set to false)
[options.pollDelay] number 250 When the usePausedPolling option is false, this option defines the delay in milliseconds in between poll requests for more records (only applicable when useEnhancedFanOut is set to false)
[options.s3] Object {} The initialization options for the S3 client used to store large items in buckets. In addition to bucketName and endpoint, it can also contain any of the AWS.S3 options.
[options.s3.bucketName] string | The name of the bucket in which to store large messages. If not provided, it defaults to the name of the Kinesis stream.
[options.s3.largeItemThreshold] number 900 The size in KB above which an item should automatically be stored in s3.
[options.s3.nonS3Keys] Array.<string> [] If the useS3ForLargeItems option is set to true, the nonS3Keys option lists the keys that will be sent normally on the kinesis record.
[options.s3.tags] string | If provided, the client will ensure that the S3 bucket is tagged with these tags. If the bucket already has tags, they will be merged.
[options.shardCount] number 1 The number of shards that the newly-created stream will use (if the createStreamIfNeeded option is set)
[options.shouldDeaggregate] string | boolean "auto" Whether the method retrieving the records should expect aggregated records and deaggregate them appropriately.
[options.shouldParseJson] string | boolean "auto" Whether if retrieved records' data should be parsed as JSON or not. Set to "auto" to only attempt parsing if data looks like JSON. Set to true to force data parse.
[options.statsInterval] number 30000 The interval in milliseconds for how often to emit the "stats" event. The event is only available while the consumer is running.
options.streamName string | The name of the stream to consume data from (required)
[options.supressThroughputWarnings] boolean false Set to true to make the client log ProvisionedThroughputExceededException as debug rather than warning.
[options.tags] Object | If provided, the client will ensure that the stream is tagged with these tags upon connection. If the stream is already tagged, the existing tags will be merged with the provided ones before updating them.
[options.useAutoCheckpoints] boolean true Set to true to make the client automatically store shard checkpoints using the sequence number of the most-recently received record. If set to false consumers can use the setCheckpoint() function to store any sequence number as the checkpoint for the shard.
[options.useAutoShardAssignment] boolean true Set to true to automatically assign the stream shards to the active consumers in the same group (so only one client reads from one shard at the same time). Set to false to make the client read from all shards.
[options.useEnhancedFanOut] boolean false Set to true to make the client use enhanced fan-out consumers to read from shards.
[options.usePausedPolling] boolean false Set to true to make the client not to poll for more records until the consumer calls continuePolling(). This option is useful when consumers want to make sure the records are fully processed before receiving more (only applicable when useEnhancedFanOut is set to false)
[options.useS3ForLargeItems] boolean false Whether to automatically use an S3 bucket to store large items or not.

kinesis.startConsumer() ⇒ Promise

Starts the stream consumer, by ensuring that the stream exists, that it's ready, and configured as requested. The internal managers that deal with heartbeats, state, and consumers will also be started.

Kind: instance method of Kinesis
Fulfil: undefined - Once the consumer has successfully started.
Reject: Error - On any unexpected error while trying to start.

kinesis.stopConsumer()

Stops the stream consumer. The internal managers will also be stopped.

Kind: instance method of Kinesis

kinesis.putRecord(params) ⇒ Promise

Writes a single data record into a stream.

Kind: instance method of Kinesis
Fulfil: Object - The de-serialized data returned from the request.
Reject: Error - On any unexpected error while writing to the stream.

Param Type Description
params Object The parameters.
params.data * The data to put into the record.
[params.explicitHashKey] string The hash value used to explicitly determine the shard the data record is assigned to by overriding the partition key hash.
[params.partitionKey] string Determines which shard in the stream the data record is assigned to. If omitted, it will be calculated based on a SHA-1 hash of the data.
[params.sequenceNumberForOrdering] string Set this to the sequence number obtained from the last put record operation to guarantee strictly increasing sequence numbers, for puts from the same client and to the same partition key. If omitted, records are coarsely ordered based on arrival time.
[params.streamName] string If provided, the record will be put into the specified stream instead of the stream name provided during the consumer instantiation.

kinesis.listShards(params) ⇒ Promise

List the shards of a stream.

Kind: instance method of Kinesis
Fulfil: Object - The de-serialized data returned from the request.
Reject: Error - On any unexpected error while writing to the stream.

Param Type Description
params Object The parameters.
[params.streamName] string If provided, the method will list the shards of the specific stream instead of the stream name provided during the consumer instantiation.

kinesis.putRecords(params) ⇒ Promise

Writes multiple data records into a stream in a single call.

Kind: instance method of Kinesis
Fulfil: Object - The de-serialized data returned from the request.
Reject: Error - On any unexpected error while writing to the stream.

Param Type Description
params Object The parameters.
params.records Array.<Object> The records associated with the request.
params.records[].data * The record data.
[params.records[].explicitHashKey] string The hash value used to explicitly determine the shard the data record is assigned to by overriding the partition key hash.
[params.records[].partitionKey] string Determines which shard in the stream the data record is assigned to. If omitted, it will be calculated based on a SHA-1 hash of the data.
[params.streamName] string If provided, the record will be put into the specified stream instead of the stream name provided during the consumer instantiation.

kinesis.getStats() ⇒ Object

Returns statistics for the instance of the client.

Kind: instance method of Kinesis
Returns: Object - An object with the statistics.

Kinesis.getStats() ⇒ Object

Returns the aggregated statistics of all the instances of the client.

Kind: static method of Kinesis
Returns: Object - An object with the statistics.

License

MIT

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Generated by auto-changelog.

v1.3.3 (2023-08-02)

  • #722: fix: package.json & package-lock.json to reduce vulnerabilities
  • #721: [Snyk] Security upgrade aws-sdk from 2.1094.0 to 2.1354.0
  • #625: [Snyk] Security upgrade got from 11.8.3 to 11.8.5
  • #615: [Snyk] Security upgrade protobufjs from 6.11.2 to 6.11.3
  • #578: Bump node-fetch from 2.6.5 to 2.6.7
  • #574: Added timestamp to shard checkpoint
  • 594870f: revert version bump
  • 26b71ae: address comments
  • d1dfaff: procced storing checkpoint if timestamp not exist
  • 281c4b7: move approximateArrivalTimestamp to the end
  • 5cfc79c: rename timestamp to approximateArrivalTimestamp
  • 0a09f11: lint

v1.3.2 (2022-03-15)

  • #518: Bugfix/update eslint rules and fix tests
  • #524: Bump aws-sdk from 2.1012.0 to 2.1029.0
  • #525: Bump lint-staged from 11.2.3 to 12.0.2
  • #475: Add initialPositionInStream to options
  • #462: Fixing back-pressure example
  • #500: Bump tmpl from 1.0.4 to 1.0.5
  • #497: Bump aws-sdk from 2.980.0 to 2.988.0
  • #496: Bump prettier from 2.3.2 to 2.4.0
  • #495: Bump chance from 1.1.7 to 1.1.8
  • #493: Upgrade
  • 7739629: Upgrade dependencies
  • e3729a5: fixes eslint issues, update rules
  • 5192ac6: Upgrade dependencies
  • 46eee88: Upgrade lint-staged
  • dabaea9: update tests
  • 1d86060: Added test for initialPosition, updated logger
  • 4e63155: Upgrade husky
  • 8c325c9: Upgrade npm-watch
  • 4617698: add timestamp to checkpoint
  • 30d54ba: cleaned up README template
  • 16707b4: rolled back jest timers to legacy version
  • da10c36: removes npmrc, remove ignoreIdentifiers from no-secrets
  • 2625ca6: adds initialPositionInStream to fan-out-consumer
  • 98d7ec7: added node v17 to allowed engine versions
  • 452e071: removed node 16.10.0 from engine
  • b645d86: adds node 16 back to git actions check
  • fb483c2: removes node 17 from github workflow
  • 3433408: fixes node engine versioning
  • ef0e57a: Update node versions
  • b6070ed: adds .npmrc for engine strict rule
  • ad1191a: fixes duplicate secrets-key exception

v1.3.1 (2021-06-01)

  • Correct the call to got.stream (fixes #430) #430

v1.3.0 (2021-05-03)

  • #433: Bump chalk from 4.1.0 to 4.1.1
  • #435: Bump eslint from 7.24.0 to 7.25.0
  • #434: Bump aws-sdk from 2.889.0 to 2.893.0
  • #431: Bump aws-sdk from 2.885.0 to 2.889.0
  • #421: Bump husky from 4.3.8 to 6.0.0
  • #427: Bump aws-sdk from 2.880.0 to 2.885.0
  • #426: Bump eslint from 7.23.0 to 7.24.0
  • #425: Bump aws-sdk from 2.875.0 to 2.880.0
  • #423: Bump aws-sdk from 2.869.0 to 2.875.0
  • #422: Bump jsdoc-to-markdown from 7.0.0 to 7.0.1
  • #420: Bump eslint from 7.22.0 to 7.23.0
  • #419: Bump semver from 7.3.4 to 7.3.5
  • #416: Bump lzutf8 from 0.5.8 to 0.6.0
  • #417: Bump npm-watch from 0.7.0 to 0.9.0
  • #415: Bump is-retry-allowed from 1.2.0 to 2.2.0
  • #413: Bump jsdoc-to-markdown from 6.0.1 to 7.0.0
  • #412: Add dependabot
  • #388: Adding deaggregation logic
  • 571bbaf: Upgrade dependencies
  • 44d6c64: Upgrade husky
  • 47a536b: Handle fan-out consumer
  • 98680d2: Upgrade dependencies
  • cb8367f: fixing a comment
  • f59adeb: Add flag to enable deaggregation
  • 23440bd: Addressing PR comments
  • f5d9d6a: Refactor documentation parameters to be alphabetical order
  • 53460fd: cleaning up private prop usage in start method in lease-manager.js
  • 19529bd: zach saves the day
  • 070f85a: Remove renovate
  • 4341401: Update maintainers and contributors
  • f1da860: Resolve conflicts
  • 688137d: Revert "1.2.3"
  • ce4bc5e: fixing leaseAcquisitionRecoveryInterval
  • 80d6792: fixing up readme
  • 2e7e8d7: TIE-2146 - Eventing: lease acquisition recovery interval patch
  • a62b867: Adding documentation for shouldDeaggregate

v1.2.2 (2021-03-22)

  • #410: replace large async retries with forever
  • #395: Upgrade dependencies
  • #367: Update dependency chance to ^1.1.7
  • #368: Update dependency lint-staged to ^10.4.0
  • #369: Update dependency prettier to ^2.1.2
  • #370: Update dependency aws-sdk to ^2.766.0
  • #371: Update dependency eslint to ^7.10.0
  • #372: Update dependency got to ^11.7.0
  • #374: Update dependency husky to ^4.3.0
  • #373: Update dependency short-uuid to v4
  • #376: Update dependency auto-changelog to ^2.2.1
  • #375: Bump node-fetch from 2.6.0 to 2.6.1
  • #341: Update dependency chalk to ^4.1.0
  • #359: Update dependency aws-sdk to ^2.739.0
  • #355: Update dependency codecov to ^3.7.2
  • #364: Update dependency npm-watch to ^0.7.0
  • #361: Update dependency jest to ^26.4.2
  • #362: Update dependency lzutf8 to ^0.5.6
  • #363: Update dependency aws4 to ^1.10.1
  • #365: Update dependency eslint to ^7.7.0
  • #366: Update dependency prettier to ^2.1.0
  • #356: Update dependency aws-sdk to ^2.726.0
  • #357: Update dependency jest to ^26.2.2
  • #358: Update dependency eslint to ^7.6.0
  • #353: Update dependency codecov to v3.7.1 [SECURITY]
  • #354: Bump codecov from 3.7.0 to 3.7.1
  • #351: Bump lodash from 4.17.15 to 4.17.19
  • #349: Update dependency eslint to ^7.5.0
  • #348: Update dependency auto-changelog to ^2.2.0
  • #350: Update dependency lru-cache to v6
  • #347: Update dependency aws-sdk to ^2.721.0
  • #338: Update dependency jsdoc-to-markdown to v6
  • #335: Update dependency chance to ^1.1.6
  • #334: Update dependency eslint to ^7.3.1
  • #333: Update dependency aws4 to ^1.10.0
  • #340: Update dependency fast-deep-equal to ^3.1.3
  • #344: Update dependency auto-changelog to ^2.1.0
  • #331: Update dependency aws-sdk to ^2.702.0
  • #346: Update dependency jest to ^26.1.0
  • #319: Update dependency lint-staged to ^10.2.11
  • #343: Adding ability to modify lease acquisition interval via options
  • #345: PCM-1049 Update to allow objects and strings for s3 data
  • #326: Update dependency eslint to v7
  • #320: Update dependency aws-sdk to ^2.679.0
  • #322: Update dependency got to v11
  • #323: Update dependency prettier to ^2.0.5
  • #324: Update dependency jest to v26
  • #327: Update dependency chance to ^1.1.5
  • #328: Update dependency codecov to ^3.7.0
  • #330: Fix Windows linting error by updating prettier config for EOL
  • 0c9bb4a: Update package-lock
  • e1430aa: Create codeql-analysis.yml
  • 667b702: Update workflows
  • 5741601: Adding ability to modify lease aquisition interval via options
  • 05fa5ed: replace large async retires with forever
  • b9eeec1: Upgrade aws-sdk
  • 9e5a3df: Add node 10
  • abf9424: defaulting to 20 seconds if leaseAcquisitionInterval not provided
  • 76dc833: Update .prettierrc
  • 6b076a2: add new line

v1.2.1 (2020-04-16)

  • #317: Hotfix/fallback to describeStream when describeStreamSummary operation not available
  • d0c1b12: Fallback to describeStream when the describeStream operation is unavailable (e.g. on localstack)
  • 5954425: Lint issues
  • bb7020c: Lint issues

v1.2.0 (2020-04-14)

  • #315: Use describeStreamSummary which doubles the limits of transactions
  • 26253ca: Upgrade to semver 7 and prettier 2.0
  • 7f2950f: Use describeStreamSummary which doubles the limits of transactions per second

v1.1.7 (2020-04-10)

  • #311: Replace retries with forever
  • #301: Update dependency aws-sdk to ^2.641.0
  • #297: Update dependency aws-sdk to ^2.639.0
  • #299: Bump acorn from 6.4.0 to 6.4.1
  • #296: Update dependency codecov to ^3.6.5
  • #289: Update dependency got to ^10.6.0
  • #291: Update dependency semver to ^7.1.3
  • #292: Update dependency husky to ^4.2.3
  • #293: Bump codecov from 3.6.4 to 3.6.5
  • #295: Update dependency lint-staged to ^10.0.8
  • #288: Update dependency aws-sdk to ^2.638.0
  • 030112f: Upgrade dependencies
  • f0f4e4e: Update package-lock
  • 4a4c336: Upgrade dependencies
  • 1ad074f: Replace retries with large number to forever
  • e05c662: Update regex as per linter suggestion

v1.1.6 (2020-02-05)

  • #287: Fix conflicts when aborting the pipeline
  • #278: Update dependency lint-staged to ^10.0.6
  • #281: Upgrade dependencies
  • #273: Update dependency semver to v7
  • #272: Update dependency chance to ^1.1.4
  • #270: Update dependency fast-deep-equal to v3
  • #269: Update dependency lint-staged to ^9.5.0
  • #267: Update dependency eslint to ^6.8.0
  • #264: bugfix: register enhanced fan-out consumers in batches of 5
  • 17879b7: Updates package-lock
  • 9438c42: Upgrade major version dependencies
  • 06cba5b: Upgraded dependencies
  • 33b9ec0: Fix timeout cheks on an active stream and make sure requests are aborted with the latest Got module
  • 4766798: Upgrades got to v.10
  • aadcc5c: Updates package-lock
  • 15b5867: fix unit tests
  • df1466b: fix linting issue

v1.1.5 (2019-11-18)

  • #256: Update dependency prettier to ^1.19.1
  • #257: Update dependency chalk to v3
  • #255: feature: add a max enhanced consumers option
  • #254: Feature/change provisionedthroughputexceededexception to debug
  • #253: bugfix: fix unparsable xml breaking pre-process transform
  • #251: Update dependency auto-changelog to ^1.16.2
  • #249: Update dependency aws-sdk to ^2.568.0
  • #250: Update dependency eslint to ^6.6.0
  • a7fc0f2: Adopt core commons 2.3.4
  • 96e20ed: Upgrade dependencies
  • e8b9bfe: feature: add a flag for supressing provisioned throughput exceeded exception warning logs
  • 75e619c: Fix problems with concurrent DynamoDB updates
  • d65edc8: feature: apply range limits on the max enhanced consumer option
  • 765b015: alphabetize properly
  • c578008: Remove unexpected record properties coming from S3
  • a321709: feature: add tests for max enhanced consumers options

v1.1.4 (2019-10-23)

  • 2efcf0a: Upgrade dependencies
  • 64d3a28: Make sure the shouldParseJson flag is passed down

v1.1.3 (2019-10-21)

  • #247: Optional JSON parse
  • 09499be: Simplify JSON parse condition. Improve documentation description.
  • eba49f7: Correct usage of actions/setup-node.version in the CI
  • 478ede7: Remove redundant default

v1.1.2 (2019-10-18)

  • #245: expose the list shards method
  • #232: Update dependency aws-sdk to ^2.535.0
  • #234: Update dependency codecov to ^3.6.1
  • #235: Update dependency lint-staged to ^9.3.0
  • #233: Update dependency eslint to ^6.4.0
  • 750240b: Upgrade dependencies and fix new linter exceptions

v1.1.1 (2019-09-11)

  • #230: bugfix: s3 config missing default values
  • #229: Update dependency aws-sdk to ^2.526.0
  • 714f723: Upgrade aws-sdk

v1.1.0 (2019-09-09)

  • #214: Use S3 for sending large messages
  • #228: Update dependency aws-sdk to ^2.525.0
  • #227: Update dependency is-retry-allowed to ^1.2.0
  • #224: Update dependency aws-sdk to ^2.524.0
  • #225: Update dependency auto-changelog to ^1.16.1
  • #223: Update dependency aws-sdk to ^2.522.0
  • #221: Update dependency auto-changelog to ^1.16.0
  • #222: Update dependency husky to ^3.0.5
  • #220: Update dependency jsdoc-to-markdown to ^5.0.1
  • #219: Update dependency eslint to ^6.3.0
  • #218: Update dependency aws-sdk to ^2.521.0
  • e8c3bb7: feature: add ability to use s3 for large items
  • 8902f69: Recreate lock file

v1.0.13 (2019-08-29)

  • #215: Update dependency aws-sdk to ^2.519.0
  • #212: Update dependency lint-staged to ^9.2.5
  • ffd47cb: Recreate the lock file
  • 5312182: Adopt core commons 2.3.3
  • 034882d: Include “TimeoutError” in the retriable put errors
  • b54be0d: Bring back the CHANGELOG template
  • 8e473c3: Adopt core commons 2.3.3

v1.0.12 (2019-08-23)

  • f02d3d0: Add test coverage for when stopping consumers on start failure
  • 9c156be: Make the consumer manager not be forced to wait until for the resolution of the start of a single consumer

v1.0.11 (2019-08-21)

  • #208: Bugfix/enhanced consumers assign conflict
  • #201: Update dependency aws-sdk to ^2.505.0
  • #200: Update dependency aws-sdk to ^2.504.0
  • 87890c8: Adopt the latest core commons
  • 774af91: Recover 100% test coverage
  • 644e9a6: Fix failing tests
  • f767fe0: Ensure all errors thrown from timer callbacks are caught
  • 3d08082: Create CODE_OF_CONDUCT.md
  • 9594ef7: Conditionally clear usage of enhanced fan-out consumers
  • 0e1ce54: Fix typo on "shouldReconcile"
  • 3af8b44: Remove the .auto-changelog file
  • d07f5f1: Only lock non-used enhanced fan-out consumers
  • 8e8be3a: Remove Node 8 from the pipeline

v1.0.10 (2019-08-02)

  • #199: Recreate the shard iterator if it expired in between polling reads
  • #197: Update dependency husky to ^3.0.2
  • #198: Update dependency aws-sdk to ^2.503.0
  • #196: Update dependency aws-sdk to ^2.501.0
  • #194: Update dependency lint-staged to ^9.2.1
  • #195: Update dependency aws-sdk to ^2.500.0
  • #193: Update dependency aws-sdk to ^2.499.0
  • #191: Update dependency aws-sdk to ^2.498.0
  • #192: Update dependency semver to ^6.3.0
  • #190: Update dependency aws-sdk to ^2.497.0
  • #189: Update dependency aws-sdk to ^2.496.0
  • #188: Update dependency husky to ^3.0.1
  • #187: Update dependency aws-sdk to ^2.495.0
  • #186: Update dependency aws-sdk to ^2.494.0
  • 25e92c5: Recreate the shard iterator if it is expired
  • 62a37b0: Recreate lock file
  • 2ca7572: Upgrade dependencies

v1.0.9 (2019-07-09)

  • #177: Bugfix/await reconciliation
  • #176: Update dependency eslint-config-lifion to ^1.2.4
  • #167: Update dependency aws-sdk to ^2.486.0
  • #168: Update dependency semver to ^6.1.3
  • #169: Update dependency lint-staged to v9
  • #170: Update dependency husky to v3
  • #165: Update dependency aws-sdk to ^2.484.0
  • #166: Update dependency husky to ^2.7.0
  • #164: Update dependency eslint to ^6.0.1
  • #163: Update dependency aws-sdk to ^2.481.0
  • #159: Update dependency aws-sdk to ^2.480.0
  • #160: Update dependency eslint to v6
  • #161: Update dependency semver to ^6.1.2
  • #162: Update dependency husky to ^2.5.0
  • #158: Update dependency aws-sdk to ^2.479.0
  • #157: Adopt GitHub Actions
  • #156: Update dependency eslint-config-lifion to ^1.2.3
  • #151: Update dependency prettier to ^1.18.2
  • #152: Update dependency aws-sdk to ^2.478.0
  • #154: Update dependency husky to ^2.4.1
  • #155: Update dependency lint-staged to ^8.2.1
  • #150: Update dependency aws-sdk to ^2.470.0
  • #148: Update dependency aws-sdk to ^2.469.0
  • #149: Update dependency lint-staged to ^8.2.0
  • 6f8d45f: Adopt the latest linter
  • b330f4e: Correct ESLint integration
  • 14d49d7: Update main.workflow
  • e772433: Update main.workflow
  • a764481: Correct the maintainers
  • 311823b: Update contributors
  • 62e21f6: Add a missing await in acquireLeases
  • fb8bf08: Update main.workflow
  • 8705869: Avoid formatting coverage files

v1.0.8 (2019-06-05)

  • #127: Feature/unit tests and updated docs
  • #147: Update dependency husky to ^2.4.0
  • #146: Update dependency aws-sdk to ^2.468.0
  • #145: Update dependency aws-sdk to ^2.464.0
  • #144: Update dependency semver to ^6.1.1
  • #143: Update dependency aws-sdk to ^2.463.0
  • #142: Update dependency aws-sdk to ^2.462.0
  • #141: Update dependency semver to ^6.1.0
  • #140: Update dependency aws-sdk to ^2.461.0
  • 54662a1: Add tests for lib/state-store
  • 4a9e7b4: Add tests for lib/dynamodb-client
  • 8af3763: Add tests for lib/fan-out-consumer
  • cb9c34f: Add tests for lib/index
  • 0669488: Add tests for lib/lease-manager
  • 254b525: Add tests for lib/kinesis-client
  • 5d10b17: Document the rest of the modules
  • ce8a742: Add tests for lib/polling-consumer
  • b12d83b: Upgrade dependencies
  • c86066b: Refactor put record(s) results
  • dd845d6: Partial tests for lib/stream
  • 4cb343e: Refactor the tests for lib/dynamodb-client
  • 3671145: Add tests for lib/records
  • 7efc497: Add tests for lib/utils
  • edaf114: Add tests for lib/table
  • efcf145: Add tests for lib/stream
  • 126e455: Add tests for lib/stats
  • 3316550: Adopt the latest eslint-config-lifion
  • 462916c: Add tests for lib/heartbeat-manager
  • e9759ad: Recover test-coverage in lib/comsumers-manager
  • 2cc0e0d: Upgrade dependencies
  • bc09da7: Integrate branch with latest release
  • 182d6f5: Upgrade aws-sdk
  • eebdb34: Upgrade aws-sdk
  • ef4e970: Upgrade aws-sdk
  • 32a89e1: Upgrade aws-sdk and codecov
  • 6fc42b3: Recover 100% test coverage in lib/utils
  • 8304786: Include network errors
  • c3f30a8: Upgrade aws-sdk
  • ae4ba4b: Adjust test thresholds
  • eaf7c2b: Tweak intervals

v1.0.7 (2019-05-22)

  • #138: Update dependency aws-sdk to ^2.460.0
  • #139: Refactor stream creation on put record(s)
  • #137: Update dependency aws-sdk to ^2.458.0
  • #134: Update dependency codecov to ^3.5.0
  • #135: Update dependency lint-staged to ^8.1.7
  • #133: Update dependency aws-sdk to ^2.455.0
  • #132: Update dependency husky to ^2.3.0
  • #131: Update dependency aws-sdk to ^2.454.0
  • #130: Update dependency prettier to ^1.17.1
  • #129: Update dependency jsdoc-to-markdown to v5
  • #128: Update dependency aws-sdk to ^2.453.0
  • #125: Update dependency aws-sdk to ^2.452.0
  • #126: Update dependency codecov to ^3.4.0
  • #124: Update dependency jest to ^24.8.0
  • #123: Update dependency lint-staged to ^8.1.6
  • #122: Update dependency aws-sdk to ^2.451.0
  • #121: Update dependency jest-junit to ^6.4.0
  • #120: Update dependency husky to ^2.2.0
  • #118: Update dependency aws-sdk to ^2.447.0
  • #119: Update dependency short-uuid to ^3.1.1
  • 2d05ec4: Improve resilience of the fan-out consumer
  • 6ccc463: Remove extra linting rules

v1.0.6 (2019-04-29)

  • #117: Add shards on update

v1.0.5 (2019-04-29)

v1.0.4 (2019-04-29)

  • 83c8b5f: Tweak timeouts for leasing and heartbeats

v1.0.3 (2019-04-29)

  • ab83203: Upgrade aws-sdk
  • 8524eee: Minor stats refactor
  • 400959c: Add tests for lib/consumers-manager
  • 93a29e2: Add more initial test files
  • 91c2ebf: Allow to override the default pay-per-request billing mode
  • 83e5d1f: Correct check for asigned enhanced consumer on the lease manager

v1.0.2 (2019-04-29)

  • #115: Feature/add stats and health
  • #110: Assign enhanced fan-out consumers to instances of the client
  • #114: Update dependency aws-sdk to ^2.444.0
  • #111: Update dependency husky to ^2.1.0
  • #109: Add retry to putRecord(s)
  • 302fd9f: Pipe records from enhanced consumers back to the client
  • 328cd80: Add stats support
  • 29fd0cb: Allow fan-out consumers to use regular checkpoints
  • ab57e5d: Fix failing tests
  • 9ebcd84: Refactor of enhanced fan-out code to make it easier to follow
  • 40f22f6: Implement use all shards in fan-out consumer mode
  • bad779e: Re-factor records encoding
  • 59a23d3: Implement shard expiration in fan-out consumers
  • 03247fe: Remove the utils module
  • 272c9f3: Refactor “setUpEnhancedConsumers” so it’s easier to follow
  • 4841494: Add initial test files
  • 5e1109b: Fix re-assignment of enhanced consumers when there are more consumers than enhanced consumers
  • 6866d9d: Confirm parent depletion works with fan-out consumers
  • 7505973: Detect parent shard depletion in fan-out mode
  • 4978a32: Add unit tests for lib/compression
  • cd352fb: Remove “setUpEnhancedConsumers” from the documentation
  • eadb90b: Simplify the polling consumer set checkpoint calls
  • 0a92f99: Retry only on throughput
  • a1eeafb: Remove GET request debug message
  • a46f0e8: Re-create lock file

v1.0.1 (2019-04-22)

  • #102: Feature/polling support
  • #106: Update dependency aws-sdk to ^2.440.0
  • #105: Update dependency auto-changelog to ^1.13.0
  • #107: Add putRecord and putRecords
  • #104: Update dependency prettier to ^1.17.0
  • #103: Update dependency auto-changelog to ^1.12.1
  • #100: Update dependency jest to ^24.7.1
  • #99: Update dependency eslint to ^5.16.0
  • #98: Update dependency aws-sdk to ^2.437.0
  • #97: Update dependency semver to v6
  • #96: Update dependency semver to ^5.7.0
  • #95: Update dependency aws-sdk to ^2.429.0
  • #94: Update dependency aws-sdk to ^2.428.0
  • #88: Update dependency jest to ^24.4.0
  • #86: Update dependency aws-sdk to ^2.418.0
  • #85: Update dependency jest to ^24.3.1
  • #84: Update dependency eslint to ^5.15.1
  • #83: Update dependency lint-staged to ^8.1.5
  • #82: Update dependency aws-sdk to ^2.417.0
  • #81: Update dependency lifion-aws-event-stream to ^1.0.2
  • #80: Update dependency eslint-config-lifion to ^1.1.0
  • #79: Update dependency aws-sdk to ^2.411.0
  • #78: Update dependency eslint to ^5.14.1
  • #77: Update dependency aws-sdk to ^2.404.0
  • #76: Update dependency jest-junit to ^6.3.0
  • #73: Update dependency aws-sdk to ^2.403.0
  • #74: Update dependency codecov to ^3.2.0
  • #75: Update dependency lint-staged to ^8.1.4
  • #72: Update dependency jest to ^24.1.0
  • #71: Update dependency aws-sdk to ^2.397.0
  • #70: Update dependency lint-staged to ^8.1.3
  • #69: Update dependency eslint to ^5.13.0
  • #68: Update dependency prettier to ^1.16.4
  • #67: Update dependency jest-junit to ^6.2.1
  • #66: Update dependency lint-staged to ^8.1.1
  • #65: Update dependency aws-sdk to ^2.395.0
  • #64: Update dependency jest to v24
  • #63: Update dependency aws-sdk to ^2.394.0
  • #60: Update dependency npm-watch to ^0.6.0
  • #62: Update dependency jest-junit to ^6.1.0
  • #61: Update dependency aws-sdk to ^2.393.0
  • #58: Update dependency prettier to ^1.16.1
  • #59: Update dependency aws-sdk to ^2.392.0
  • #57: Update dependency eslint to ^5.12.1
  • #55: Update dependency aws-sdk to ^2.391.0
  • #56: Update dependency got to ^9.6.0
  • #54: Update dependency aws-sdk to ^2.388.0
  • #50: Update dependency aws-sdk to ^2.387.0
  • #51: Update dependency jest-junit to v6
  • #52: Update dependency got to ^9.5.1
  • #53: Update dependency auto-changelog to ^1.11.0
  • #45: Update dependency aws-sdk to ^2.384.0
  • #49: Update dependency chalk to ^2.4.2
  • #46: Update dependency eslint to ^5.12.0
  • #47: Update dependency husky to ^1.3.1
  • #48: Update dependency auto-changelog to ^1.10.3
  • #41: Update dependency aws-sdk to ^2.378.0
  • #42: Update dependency husky to ^1.2.1
  • #43: Update dependency got to ^9.5.0
  • #40: Update dependency got to ^9.4.0
  • #37: Update dependency aws-sdk to ^2.373.0
  • #39: Update dependency eslint to ^5.10.0
  • #38: Update dependency prettier to ^1.15.3
  • bd4f9ff: Upgrade NPM modules
  • 41d2b9f: Upgrade NPN dependencies
  • 576f166: Make sure the state table is tagged as expected
  • 8906c14: Initial leasing algorithm implementation
  • 3400bcd: Normalize the stream and table modules
  • cf182c3: Fix continuous polling on a shard split
  • e92c4ac: Correct lock file, optimize renovate
  • 9c76b02: Make sure the client recovers to any error
  • ddb50fe: Upgrade aws-sdk
  • 7e4ece3: Implement roll call for consumers
  • 26675f8: Allow reading from all shards
  • 9fcec2f: Document the state-store
  • db13161: Adopt the concept of consumer group
  • 69a2b28: Re-create lock file
  • e64136d: Correct the proxies, prepare for shard reader timers
  • 7c707f3: Improve debug messages
  • 84e9129: Fix shard distrution and stop consumers after lease expiration
  • d610f8a: Upgrade AWS-SDK
  • fa2be93: Add support to manually set checkpoints
  • 65b8470: Remove the coordinated timeout in roll calls
  • 08c2834: Correct the README with the correct encryption documentation
  • 8fed106: Try to acquire leases for shards by sorted shard ID
  • 3b5d6c7: Fix missing initialization of the dynamoDb option
  • d949dc6: Correct copyright in the license

v1.0.0 (2018-11-29)

  • #36: Update dependency aws-sdk to ^2.366.0
  • #33: Update dependency lint-staged to ^8.1.0
  • #32: Update dependency husky to ^1.2.0
  • #34: Update dependency npm-watch to ^0.5.0
  • #35: Update dependency aws-sdk to ^2.363.0
  • #1: Enhanced Fan-Out Support
  • #31: Update dependency eslint-config-lifion to ^1.0.3
  • #29: Update dependency lint-staged to ^8.0.5
  • #30: Update dependency auto-changelog to ^1.10.2
  • #23: Update dependency prettier to ^1.15.2
  • #28: Update dependency auto-changelog to ^1.10.1
  • #25: Update dependency eslint to ^5.9.0
  • #26: Update dependency auto-changelog to ^1.10.0
  • #27: Update dependency husky to ^1.1.4
  • #24: Update dependency auto-changelog to ^1.9.0
  • #20: Update dependency eslint to ^5.8.0
  • #21: Update dependency lint-staged to v8
  • #22: Update dependency husky to ^1.1.3
  • #19: Update dependency eslint to ^5.7.0
  • #18: Update dependency husky to ^1.1.2
  • #17: Update dependency semver to ^5.6.0
  • #16: Update dependency eslint-config-lifion to ^1.0.2
  • #15: Feature/enable npm publish ci
  • #13: Update dependency auto-changelog to ^1.8.1
  • #12: Update dependency eslint-config-lifion to ^1.0.1
  • #11: Update dependency husky to ^1.1.1
  • #10: Update dependency eslint to ^5.6.1
  • #9: Update dependency husky to ^1.0.1
  • #7: Update dependency eslint-config-lifion to v1
  • #6: Update dependency eslint to v5
  • #8: Update dependency husky to v1
  • #5: Update dependency npm-watch to ^0.4.0
  • #2: Configure Renovate
  • 1be561c: Initial commit
  • 9894deb: Add basic CircleCI integration
  • 27a7d4f: Re-create package-lock.json
  • 5823729: Add integration with CircleCI
  • b5b9ce1: Set NVM to use the current LTS
  • 3ce84f9: Add management of stream consumers, refactor stream management
  • 562bea1: Add test coverage
  • e5588a6: Add enhanced-fanout shard subscriber and initial parser
  • a9765f1: Upgrade aws-sdk, eslint-config-lifion, and eslint
  • 38b435f: Update documentation
  • 4faac4d: Ensure streams are created, encrypted, and tagged
  • c695f98: Add a Kinesis records decoder
  • 0dd328a: Recreate the shard subscription stream when expiring
  • 972c7f6: Adopt lifion-aws-event-stream
  • 40f156f: Remove the check-dependencies script in favor of Renovate
  • 1bb389b: Include the shard ID in the piped records
  • cd5d904: Connect the parsed records into the client
  • c591875: Fix the utils tests
  • 4f9fad8: Add test coverage for lib/utils
  • 197f2c4: Add deploy and publish to circleci
  • 30c0a3b: Replace toBeCalledWith calls with its canonical version
  • 5ad427a: Fix directory for .npmrc and add reports
  • 39f098d: Make the tag test cases more specific
  • 0ffdc6a: Rename project to lifion-kinesis
  • ce26fc3: Change the Renovate configuration
  • 07fd3aa: Delete renovate.json
  • c8d578e: Add renovate.json
  • a641c0d: Make sure the CI stops if the tests fail
  • 23ac7b7: Correct the package-lock.json file