amazon-kinesis-client-nodejs icon indicating copy to clipboard operation
amazon-kinesis-client-nodejs copied to clipboard

Graceful Shutdown of Workers

Open leamarty opened this issue 7 years ago • 4 comments

Since September 30, 2016, there's a new method in KCL's library (for Java) that handles very well the shutdown. Its called "requestShutdown", and it has already been implemented there.

https://github.com/awslabs/amazon-kinesis-client/pull/109

We are missing that method here in Node... when KCL decides to shutdown a worker, how can we handle and perform a Graceful Shutdown? Meaning that would be cool to let the worker to finish processing the current batch, then checkpoint, and only then start the shutdown.

leamarty avatar Mar 16 '17 19:03 leamarty

Currently graceful shutdown isn't supported for the MultiLang daemon clients at this time. We would like to bring support for the feature to the MultiLang daemon, and are prioritizing the feature against other feature requests.

To assist us with prioritizing this, could anyone else affected please post a reaction or comment.

pfifer avatar May 18 '17 16:05 pfifer

This should definitely be added as soon as possible.

kingchad avatar May 26 '17 23:05 kingchad

It appears aws-kcl v1.7.6 Added support for graceful shutdown in MultiLang Clients. @pfifer When will we see a new npm version cut that uses version ^1.7.6 which should hopefully fix this issue? Currently master points to v1.7.6 but might as well update to v1.8.0 before cutting a new npm version.

AaronHarris avatar Aug 01 '17 00:08 AaronHarris

The changes on the node.js side have been merged in as part of #39

We have an additional change for allowing processRecords calls to be timed out that is coming, and intend to release the two changes together.

pfifer avatar Aug 01 '17 15:08 pfifer