hi evreyone,
for log purpose i need to count all the messages that arrive in a node. i need one value in a varible
At the moment i set up topic + counter + join with a timeout. but is not the proper soluutin sin time can take 2 ms 2 second or one minutes depending on the amount of message(variable).
i think msg.complete can be the solution but i cant find a set up to wait the precedent node as completed is job.
best solution wolud be a javascript code so i can integrate it in the log fuction node
[
{
"id": "eb56325d12849757",
"type": "change",
"z": "97d240c946ec6b33",
"g": "8db8781fc043d9a0",
"name": "topic ",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "num-query",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1290,
"y": 220,
"wires": [
[
"01b05955132bd655"
]
]
},
{
"id": "01b05955132bd655",
"type": "counter",
"z": "97d240c946ec6b33",
"g": "8db8781fc043d9a0",
"name": "",
"init": "0",
"step": "1",
"lower": null,
"upper": null,
"mode": "increment",
"outputs": "1",
"x": 1300,
"y": 260,
"wires": [
[
"77b3d0a01dee7270"
]
]
},
{
"id": "77b3d0a01dee7270",
"type": "join",
"z": "97d240c946ec6b33",
"g": "8db8781fc043d9a0",
"name": "",
"mode": "custom",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "3",
"count": "",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 1290,
"y": 300,
"wires": [
[
"f8cbb1dc34bcc942"
]
]
}
]