drmibell / node-red-contrib-queue-gate

A Node-RED node for controlling message flow (with queueing).
Apache License 2.0
26 stars 16 forks source link

dequeue command invalid #21

Closed berrySkies closed 3 years ago

berrySkies commented 3 years ago

Hi Thanks for the package, very helpful.

I cannot get the dequeue command to work - receive "invalid command ignored". I also note you don't use this command in your example flows. I wonder if it's implemented despite being in the documentation?

Thanks

drmibell commented 3 years ago

This issue has been raised once before, and the cause is basically a lack of clarity in the documentation. Every control message (command) has three attributes: a name, a default value (payload), and an action it produces. The command you want is named triggerCmd. Its default value is the string 'trigger', and the action it causes is dequeue. I can see how even someone very familiar with the node could become confused. In this case, you could either use msg.payload = 'trigger' with the default configuration or change 'trigger' to 'dequeue' in the edit dialog and continue to use msg.payload = 'dequeue'.

This is the only case where the control message name, default value, and action do not use exactly the same terms. When the node was being developed, I was reminded that several existing nodes and flows for queueing messages use a command called "trigger" to release the next message, and that the term "dequeue" might be too technical for the average user. The result has been more consistency and some confusion. I think I have found a way to improve the documentation, and I will include it in the next update. Please let me know if you continue to have difficulty with this.

berrySkies commented 3 years ago

Got it....thanks Michael. I reread docs a number of times and obviously misinterpreted.regards