this._reportError is not a function
ivanmaximenko opened this issue · 4 comments
ivanmaximenko commented
_reportError function is called in kcl_manager but it is not defined
daryl-d commented
While this is not the ideal solution @ivanmaximenko,
I'm testing out patching the KCLManager prototype.
import * as KCLManager from 'aws-kcl/lib/kcl/kcl_manager'
if (KCLManager.prototype._reportError === undefined) {
const logger = getLogger(__filename)
logger.warn({}, 'defining _reportError on KCLManager')
KCLManager.prototype._reportError = function (log: string) {
logger.info({ reportError: true }, log)
}
}
daryl-d commented
After the patch I got the real error message
Invalid action received: {"action":"shutdown","reason":"TERMINATE"}
daryl-d commented
There seems to be some missing cases in the action handler here
When compared to the ones which the parent Java process can send
Looks like the following are not handled at all
- ShutdownMessage (shutdown)
- StatusMessage (status)
daryl-d commented
I think the problem is that we are using KCL 1.x, where as v2.0.0 of this lib is designed for only KCL 2.0.0.
However they did not say they removed support for KCL 1.x in the release notes https://github.com/awslabs/amazon-kinesis-client-nodejs#release-200-march-6-2019 - perhaps this was implied ?