Search code examples
node.jsnode-red

How to set msg.topic for Oracle nodes in Node-Red?


node-red flow In the flow above I run query Q1 in DB1, process payload and form Q2 query based on the payload received and run it in DB2. Now I want to do some processing based on whether payload is received from DB2 or Q1 in node 'process'.How to set msg.topic for DB2 node?


Solution

  • Put a change node or a another function node between DB2 and the process function node to add/change the topic on the msg.

    Also be aware that the process function node will always receive 2 independent messages, 1 from Q1 and one from DB2. You will have to use the context to store state between them.