awslabs / amazon-kinesis-client-nodejs

Amazon Kinesis Client Library for Node.js
Apache License 2.0
297 stars 206 forks source link

Consuming multiple streams using KCL #4

Open xyz1hang opened 9 years ago

xyz1hang commented 9 years ago

Hi I have an application that consuming multiple streams by starting several KCL processes, which works fine, but when the application is interrupted rather than an exception raised from my record processor those multiple instances of MultiLangDaemon will continue running, which causes problems.

When I restart the application a new set of MultiLangDaemon processes will be started and from this point on wards I am running into situation in which:

I can stop those multiple node-js KCL bootstrap processes by executing OS commands in my application but I don't know how to ONLY stop MultiLangDaemon processes (they are just java.exe on windows).

All these can be resolved "relatively properly", if I can stop the MultiLangDaemon process, hence when new MultiLangDaemon process start the leaseOwner ID will be changed and the process starts normally and the machine won't run out of memory. (I can't just kill all "java.exe" on windows or java on Unix system)

You suggestion and help will be much appreciated !

nemo commented 9 years ago

+1 on this one. Having the same problem with restarting the process. Lots of lingering java processes..

I'm solving this for now by doing a killall java since the machine is clean of other ciritical java proceesses. But that's pretty scary to me.