Good morning,
I have been playing around with the Gate Nodes (Simple Gate and Q-Gate), trying to understand the interaction between the nodes from a queuing flow that @Colin suggested in this Post.
In doing this I have broken the node down to it's very basics and have seemingly found that if there is a single message in q-gate, it doesn't seem to get through. Add a message and the new message will be passed through, but the first message waiting in the queue seems to get lost. Changing 'Max queue' makes no difference.
Can't understand why this should be, but I would like to know if I am missing something here.
TIA,
Colin J
Minimal flow...
[{"id":"a46a37a8.38f5d8","type":"inject","z":"9dd4ed29.e99178","name":"Payload","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":80,"wires":[["8b5f68e5.69c498"]]},{"id":"8b5f68e5.69c498","type":"q-gate","z":"9dd4ed29.e99178","name":"q-gate","controlTopic":"control","defaultState":"queueing","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","queueCmd":"queue","defaultCmd":"default","triggerCmd":"trigger","flushCmd":"flush","resetCmd":"reset","peekCmd":"peek","dropCmd":"drop","statusCmd":"status","maxQueueLength":"","keepNewest":false,"qToggle":false,"persist":true,"x":470,"y":80,"wires":[["4c97c82b.2c6cc"]]},{"id":"48756100.807508","type":"inject","z":"9dd4ed29.e99178","name":"Next!","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":140,"wires":[["9cabe358.3e8938"]]},{"id":"9cabe358.3e8938","type":"function","z":"9dd4ed29.e99178","name":"get next","func":"node.send({topic: \"control\", payload: \"drop\"})\nmsg.topic = \"control\"\nmsg.payload = \"peek\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":300,"y":140,"wires":[["8b5f68e5.69c498"]]},{"id":"4c97c82b.2c6cc","type":"debug","z":"9dd4ed29.e99178","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":610,"y":80,"wires":[]}]
EDIT:
25 Nov 09:33:33 - [info] Node-RED version: v1.2.5
25 Nov 09:33:33 - [info] Node.js version: v12.18.4
25 Nov 09:33:33 - [info] Linux 5.4.51-v7+ arm LE
25 Nov 09:33:35 - [info] Loading palette nodes
25 Nov 09:33:49 - [info] Dashboard version 2.24.0 started at /ui
All nodes up to date
RPi 3B+ Buster