Why does this flow generate two mqttt messages for the topic /eccentric/echo/data? The flow sends and receives /eccentric/echo/control, as expected, this in turn should trigger send and receive of /eccentric/echo/data, with one message as output, but two are received, and are they are not duplicates, given the time values are different in the payload. Something basic here, I am just missing?
Output...
3/28/2021, 7:13:49 PMnode: Message/eccentric/echo/data : msg : Object
object
topic: "/eccentric/echo/data"
payload: "{"time":1616983930593,"host":"eccentric"}"
qos: 0
retain: false
_msgid: "1f522bbe.b8f8d4"
3/28/2021, 7:13:50 PMnode: Message/eccentric/echo/data : msg : Object
object
topic: "/eccentric/echo/data"
payload: "{"time":1616983930582,"host":"eccentric"}"
qos: 0
retain: false
_msgid: "fc4c2120.b567c"
Flow...
[{"id":"16672c72.5fe314","type":"mqtt in","z":"c401a53d.622c8","name":"Broker (/+/echo/control)","topic":"/+/echo/control","qos":"2","datatype":"auto","broker":"98414585.30b018","x":120,"y":140,"wires":[["1c91c29.970263d"]]},{"id":"f2d91f9.fda72e","type":"mqtt out","z":"c401a53d.622c8","name":"Broker (/<Host>/echo/data)","topic":"","qos":"","retain":"","broker":"98414585.30b018","x":540,"y":140,"wires":[]},{"id":"1c91c29.970263d","type":"function","z":"c401a53d.622c8","name":"Receive","func":"const HOST = global.get('os').hostname().split('.')[0];\n\nmsg.payload = {\n 'time': (new Date()).getTime(),\n 'host': `${HOST}`\n}\n\nmsg.topic = `/${HOST}/echo/data`;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":320,"y":140,"wires":[["f2d91f9.fda72e"]]},{"id":"b1ac118.75e957","type":"mqtt in","z":"c401a53d.622c8","name":"Broker (/+/echo/data)","topic":"/+/echo/data","qos":"2","datatype":"auto","broker":"98414585.30b018","x":120,"y":220,"wires":[["7056232f.8185a4"]]},{"id":"7056232f.8185a4","type":"debug","z":"c401a53d.622c8","name":"Message","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":320,"y":220,"wires":[]},{"id":"ccea33ed.6c1328","type":"inject","z":"c401a53d.622c8","name":"Invoke","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":90,"y":60,"wires":[["1ace4da5.86880a"]]},{"id":"1c68dc64.38cd74","type":"mqtt out","z":"c401a53d.622c8","name":"Broker (/<Host>/echo/control)","topic":"","qos":"","retain":"","broker":"98414585.30b018","x":450,"y":60,"wires":[]},{"id":"1ace4da5.86880a","type":"function","z":"c401a53d.622c8","name":"Send","func":"const HOST = global.get('os').hostname().split('.')[0];\n\nmsg.payload = {\n 'time': msg.payload,\n 'host': `${HOST}`\n}\n\nmsg.topic = `/${HOST}/echo/control`;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":230,"y":60,"wires":[["1c68dc64.38cd74"]]},{"id":"98414585.30b018","type":"mqtt-broker","name":"Broker","broker":"broker.dachshund-digital.org","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]