Emitter for input change in behaviour

Prior to v1 my code to put a wrapper on an input emitter to trap a message before an node processed the message. With the new version node.listeners('input') returns no events when it is runs. The wrappers are applied on "nodes-started". Wondering why and how can I make my wrapper logic worked. Us a wrapper to control flow and get timing information. Plus thinking of using the technique for dynamic debugging.

Unfortunately you havent provided nearly enough info (or a code example) for me to be of much use to you - but something tells me your issue is possibly related to msg cloning by default.

use

node.send(msg,false);
return null;

instead of

return msg;

Reference

Can you link to your code so we can see what you mean? There were a number of changes in 1.0 for the async message handling that would have modified how these internal APIs worked.

We have plans for a proper flow debugger, but its predicated on the Pluggable Message routing feature - which would be the public api for inserting code into the messaging path. It's a feature that's very high on my personal wish list, but not currently top of the prioritisation.

One example of my code problem can be found in https://github.com/peterprib/node-red-contrib-queuemanager. queueManager.js is the driver and the RED.events.on("nodes-started" builds does the wrappers for input. Have a correct version for some of the issues caused by 1.0 but can't get pass base issue of emitter not listing anyl events.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.