schimaere / node-red-contrib-natsstreaming

NodeRED nodes for nats-streaming
MIT License
5 stars 3 forks source link

TypeError: node.err is not a function in publish node #1

Closed ronopitz closed 5 years ago

ronopitz commented 5 years ago

Hi, there is a problem in the publish node.

Errror message:

16 Aug 08:22:13 - [info] [nats-streaming-publish:e7f7705c.c135e] publish failed: Error: stan: publish ack timeout
16 Aug 08:22:13 - [red] Uncaught Exception:
16 Aug 08:22:13 - TypeError: node.err is not a function
    at Object.ah (/data/node_modules/node-red-contrib-natsstreaming/nats-streaming-publish.js:67:26)
    at Timeout.ack.t.timers.setTimeout (/data/node_modules/node-nats-streaming/lib/stan.js:606:15)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1

Background: I tried to send 2000 msg/second to the nats streaming server. The msg publish failed: Error: stan: publish ack timeout it's ok for me, but node-red stops with Exit status 1

Solution: I comment out the line 67.

Thanks

schimaere commented 5 years ago

Hi, yes this line should be: node.error('problem while publishing message', + err); I pushed an update to github. Can you test if this fixes the error for you?

ronopitz commented 5 years ago

Hi, the test is done. It works. Thanks

schimaere commented 5 years ago

You are welcome.