Socket
Socket
Sign inDemoInstall

aws-kcl

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-kcl - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

62

lib/kcl/kcl_manager.js

@@ -77,2 +77,6 @@ /***

},
beginShutdownRequested: function(context) {
this.transition(context, 'ShutdownRequested');
return true;
},
beginShutdown: function(context) {

@@ -111,2 +115,26 @@ this.transition(context, 'ShuttingDown');

},
ShutdownRequestedCheckpointing: {
finishCheckpoint: function(context) {
this.transition(context, 'ShutdownRequested');
return true;
},
'*': function(context) {
this.transition(context, 'Error');
return false;
}
},
ShutdownRequested: {
beginCheckpoint: function(context) {
this.transition(context, 'ShutdownRequestedCheckpointing');
return true;
},
finishShutdownRequested: function(context) {
this.transition(context, 'Ready');
return true;
},
'*': function(context) {
this.transition(context, 'Error');
return false;
}
},
ShuttingDown: {

@@ -217,3 +245,5 @@ beginCheckpoint: function(context) {

var actionType = action.action;
if (actionType === 'initialize' || actionType === 'processRecords' || actionType === 'shutdown') {
if (actionType === 'initialize' ||
actionType === 'processRecords' ||
actionType === 'shutdown') {
this._onRecordProcessorAction(action);

@@ -224,2 +254,5 @@ }

}
else if (actionType === 'shutdownRequested') {
this._onShutdownRequested(action);
}
else {

@@ -317,2 +350,29 @@ this._reportError(util.format('Invalid action received: %j', action));

/**
* Gets invoked when shutdownRequested is called.
* @param {Object} action - RecordProcessor related action
* @private
*/
KCLManager.prototype._onShutdownRequested = function(action) {
var context = this._context;
var recordProcessor = context.recordProcessor;
var recordProcessorFunc = recordProcessor.shutdownRequested;
if (typeof recordProcessorFunc === 'function') {
var recordProcessorFuncInput = cloneToInput(action);
var checkpointer = context.checkpointer;
this._handleStateInput(context, 'beginShutdownRequested');
var callbackFunc = function() {
this._recordProcessorCallback(context, action, 'finishShutdownRequested');
}.bind(this);
recordProcessorFuncInput.checkpointer = checkpointer;
recordProcessorFunc.apply(recordProcessor, [recordProcessorFuncInput, callbackFunc]);
}
else {
this._sendAction(context, {action: 'status', responseFor: action.action});
}
};
/**
* Sends the given action to the MultiLangDaemon.

@@ -319,0 +379,0 @@ * @param {object} context - Record processor context for which this action belongs to.

2

package.json
{
"name": "aws-kcl",
"description": "Kinesis Client Libray (KCL) in Node.js.",
"version": "0.6.0",
"version": "0.7.0",
"author": {

@@ -6,0 +6,0 @@ "name": "Amazon Web Services",

@@ -154,3 +154,3 @@ # Amazon Kinesis Client Library for Node.js

Amazon KCL for Node.js uses [MultiLangDaemon][multi-lang-daemon] provided by [Amazon KCL for Java][amazon-kcl-github]. You also need Java version 1.7 or higher installed.
Amazon KCL for Node.js uses [MultiLangDaemon][multi-lang-daemon] provided by [Amazon KCL for Java][amazon-kcl-github]. You also need Java version 1.8 or higher installed.

@@ -229,3 +229,3 @@ ### Setting Up the Environment

## Running on Amazon EC2
Log into an Amazon EC2 instance running Amazon Linux, then perform the following steps to prepare your environment for running the sample application. Note the version of Java that ships with Amazon Linux can be found at `/usr/bin/java` and should be 1.7 or greater.
Log into an Amazon EC2 instance running Amazon Linux, then perform the following steps to prepare your environment for running the sample application. Note the version of Java that ships with Amazon Linux can be found at `/usr/bin/java` and should be 1.8 or greater.

@@ -277,2 +277,15 @@ ```sh

### Release 0.7.0 (August 2, 2017)
* Updated the dependency on [Amazon Kinesis Client for Java][amazon-kcl-github] to 1.8.1.
This adds support for setting a timeout when dispatching records to the node.js record processor.
If the record processor doesn't respond in the given time the Java processor is terminated.
The timeout for the this can be set by adding `timeoutInSeconds = <timeout value>`. The default for this is no timeout.
__Setting this can cause the KCL to exit suddenly, before using this ensure that you have an automated restart for your application__
__Updating minimum requirement for the JDK version to 8__
* [Amazon Kinesis Client Issue #185](https://github.com/awslabs/amazon-kinesis-client/issues/185)
* [PR #41](https://github.com/awslabs/amazon-kinesis-client-nodejs/pull/41)
* Added support to handle graceful shutdown requests.
* [PR #39](https://github.com/awslabs/amazon-kinesis-client-nodejs/pull/39)
* [Issue #34](https://github.com/awslabs/amazon-kinesis-client-nodejs/issues/34)
### Release 0.6.0 (December 12, 2016)

@@ -279,0 +292,0 @@ * Updated the dependency on [Amazon Kinesis Client for Java][amazon-kcl-github] to 1.7.2.

Sorry, the diff of this file is not supported yet

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