New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lifion-kinesis

Package Overview
Dependencies
Maintainers
4
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lifion-kinesis - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

7

CHANGELOG.md

@@ -7,2 +7,9 @@ ### Changelog

#### [v1.0.12](https://github.com/lifion/lifion-kinesis/compare/v1.0.11...v1.0.12)
> 23 August 2019
- Add test coverage for when stopping consumers on start failure [`f02d3d0`](https://github.com/lifion/lifion-kinesis/commit/f02d3d08c1bc336c4d0ed467ad263ecc5cda4448)
- Make the consumer manager not be forced to wait until for the resolution of the start of a single consumer [`9c156be`](https://github.com/lifion/lifion-kinesis/commit/9c156be9c24c8f5321fbbdb2d8e122693f88746b)
#### [v1.0.11](https://github.com/lifion/lifion-kinesis/compare/v1.0.10...v1.0.11)

@@ -9,0 +16,0 @@

2

lib/consumers-manager.js

@@ -184,3 +184,3 @@ /**

consumers[shardId] = consumer;
await consumer.start();
consumer.start();
} catch (err) {

@@ -187,0 +187,0 @@ logger.error('Unexpected recoverable error when trying to start a consumer:', err);

@@ -270,4 +270,13 @@ /**

const { shardsPath, shardsPathNames } = await stateStore.getShardsData();
let shardsPath;
let shardsPathNames;
try {
({ shardsPath, shardsPathNames } = await stateStore.getShardsData());
} catch (err) {
logger.warn("Can't start the consumer as the state can't be resolved:", err);
stopConsumer(shardId);
return;
}
const requestFlags = {};

@@ -284,3 +293,3 @@ let stream;

if (headers['content-type'] !== AWS_EVENT_STREAM || statusCode !== 200) {
logger.error(`Subscription unsuccessful: ${statusCode}`);
logger.warn(`Subscription unsuccessful: ${statusCode}`);
requestFlags.isEventStream = false;

@@ -354,3 +363,6 @@ reportError('kinesis', { statusCode }, streamName);

const { code, message, requestId, statusCode } = err;
if (!shouldBailRetry(err)) {
const isArnInUseError =
code === 'ResourceInUseException' &&
message.includes('Another active subscription exists');
if (!shouldBailRetry(err) || isArnInUseError) {
logger.warn(

@@ -357,0 +369,0 @@ [

@@ -211,3 +211,3 @@ /**

try {
logger.debug('Trying to acquire leases…');
logger.debug('Attempting lease acquisition…');

@@ -214,0 +214,0 @@ const { streamArn } = await checkIfStreamExists(privateProps);

@@ -258,5 +258,15 @@ /**

const privateProps = internal(this);
const { shardId, stateStore } = privateProps;
const { shardsPath, shardsPathNames } = await stateStore.getShardsData();
const { logger, shardId, stateStore, stopConsumer } = privateProps;
let shardsPath;
let shardsPathNames;
try {
({ shardsPath, shardsPathNames } = await stateStore.getShardsData());
} catch (err) {
logger.warn("Can't start the consumer as the state can't be resolved:", err);
stopConsumer(shardId);
return;
}
privateProps.setCheckpoint = async sequenceNumber => {

@@ -263,0 +273,0 @@ await stateStore.storeShardCheckpoint(shardId, sequenceNumber, shardsPath, shardsPathNames);

@@ -283,2 +283,5 @@ /**

const { isUsedBy } = enhancedConsumers[consumerName];
if (isUsedBy == null) {
return false;
}
if (oldConsumers.includes(isUsedBy)) {

@@ -285,0 +288,0 @@ logger.debug(`Enhanced consumer "${consumerName}" can be released, missed heartbeat.`);

{
"name": "lifion-kinesis",
"version": "1.0.11",
"version": "1.0.12",
"description": "Lifion client for Amazon Kinesis Data streams",

@@ -53,3 +53,3 @@ "keywords": [

"async-retry": "^1.2.3",
"aws-sdk": "^2.514.0",
"aws-sdk": "^2.516.0",
"aws4": "^1.8.0",

@@ -95,5 +95,5 @@ "fast-deep-equal": "^2.0.1",

"template": "public",
"updated": "2019-08-20T20:54:06.146Z",
"version": "2.2.0"
"updated": "2019-08-23T18:18:36.111Z",
"version": "2.3.1"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc