Hi,
I was expecting two brand new messages created from within a function node, to have unique _msgids:
[{"id":"12ca8b0b.cb49dd","type":"function","z":"52115b7e.28bf34","name":"msg","func":"msg1 = { cmd: \"one\", topic:\"one\", payload:\"one\", _msgid: \"266c0e6c.d993f2\" };\nmsg2 = { cmd: \"two\", topic:\"two\", payload:\"two\"};\nreturn [msg1, msg2];","outputs":"2","noerr":0,"x":510,"y":200,"wires":[["e80ace03.ae3ae"],["d48a55d0.e344b"]]},{"id":"809918c3.81aea","type":"inject","z":"52115b7e.28bf34","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":300,"y":200,"wires":[["12ca8b0b.cb49dd","fbec44a0.771e1"]]},{"id":"e80ace03.ae3ae","type":"debug","z":"52115b7e.28bf34","name":"","active":true,"console":"false","complete":"true","x":630,"y":180,"wires":[]},{"id":"d48a55d0.e344b","type":"debug","z":"52115b7e.28bf34","name":"","active":true,"console":"false","complete":"true","x":630,"y":220,"wires":[]},{"id":"fbec44a0.771e1","type":"debug","z":"52115b7e.28bf34","name":"","active":true,"console":"false","complete":"true","x":630,"y":140,"wires":[]}]
To my surprise, I couldn't find a way to have unique _msgid: the three debug nodes always show the same value.
What's the reason behind that? Is there a way I could create a brand new _msgid?
The reason I'm asking is because I'm getting weird behaviors from a subflow I wrote.
The subflow (which should ideally be a node, but I figured it'd be easier to start with a subflow for fast prototyping) does some serialization by storing a messages in a queue (global variable) and pulling it out whenever a response is received.
Indeed, I'm getting duplicated messages and I suspect I'm creating weird loops due to the _msgid being stored and duplicated.
Any ideas?
Thanks