Registry / messaging / node-red-contrib-simple-message-queue

node-red-contrib-simple-message-queue

JSON →
library0.3.2jsnpmunverified

Node-RED node providing an in-memory message queue with trigger, peek, TTL, bypass, and queue count features. Current stable version v0.3.2. Released intermittently. Differentiates from other queue nodes by offering TTL-based message expiry, peek without removal, dynamic interval bypass, and a clear input hierarchy that prioritizes reset, queueCount, peek, bypassInterval, bypass, TTL, and trigger. Useful for building backpressure or buffering flows in Node-RED.

npm install node-red-contrib-simple-message-queue
INSTALL
IMPORT
SIG · NODE-RED-CONTRIB-S
N
node-red-contrib-simple-message-queue
messagingjavascriptv0.3.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SimpleMessageQueue
import SimpleMessageQueue from 'node-red-contrib-simple-message-queue'
const SimpleMessageQueue = require('node-red-contrib-simple-message-queue')
As a Node-RED contrib, it is installed via npm and registered as a palette node; import/require is not used in Node-RED flows directly. Snippet shown for completeness.
Node-RED flow usage
Install via npm, then use the 'simple-message-queue' node in the palette.
Using legacy Node-RED node registration patterns that are not compatible.
This package is a Node-RED contrib node. No explicit import is needed; just install and it appears in the palette.
Configuration UI
Configure via Node-RED editor UI: set bypassInterval, TTL, etc.
Properties are set via the Node-RED editor; no code configuration required.

Example Node-RED flow JSON that creates a simple queue node and injects a message. The queue node stores messages and releases them on trigger or peek.

// In Node-RED, create a flow with an Inject node, simple-message-queue node, and Debug node. // Output of the queue node will contain _queueCount, _isPeek, etc. [ { "id": "n1", "type": "inject", "z": "flow1", "name": "Inject trigger", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 200, "y": 100, "wires": [["n2"]] }, { "id": "n2", "type": "simple-message-queue", "z": "flow1", "name": "My Queue", "bypassInterval": 0, "x": 400, "y": 100, "wires": [["n3"]] }, { "id": "n3", "type": "debug", "z": "flow1", "name": "Debug", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "x": 600, "y": 100, "wires": [] } ]
Debug
Known issues
gotchaProperty hierarchy: if a msg contains both 'ttl' and 'trigger', 'trigger' takes precedence after higher priority checks.
fix
Send only one control property per message to avoid unexpected behavior. Refer to Input hierarchy documentation.
affects: <=0.3.2
gotchaQueue count property: '_queueCount' includes remaining messages after release, except the released message itself. For example, if 3 messages are queued and one is triggered, '_queueCount' is 2.
fix
Interpret '_queueCount' as messages left excluding the triggered one.
affects: <=0.3.2
gotchaBypass mode accumulates messages in the queue while bypassing new ones; queue is not cleared when bypass is turned off.
fix
Manually send a 'reset' message if you need to clear the queue when disabling bypass.
affects: <=0.3.2
gotchaTTL: If a message with TTL expires before being released, it is silently removed without output.
fix
Ensure TTL is long enough for processing, or handle missing output gracefully.
affects: <=0.3.2
gotchaPeek does not trigger status updates, but trigger does. Distinguish using '_isPeek' property.
fix
Check msg._isPeek in downstream nodes if you need to differentiate.
affects: <=0.3.2
Errors
Common errors & fixes
TypeError: Cannot read property '_queueCount' of undefined
The queue node does not output a message when a 'reset' message is received (by design, it does not forward the reset message).
fix
Do not attach a debug node directly after a reset; instead, use a separate path or check for msg.reset in a function node before queuing.
Queue not releasing messages even after trigger msg.sent
The 'trigger' property must be included in the message payload. If only a plain message is sent without the trigger property, it is stored but not released.
fix
Set msg.trigger = true (or any truthy value) to release the next queued message.
Upgrade
Version history
0.3.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
OpenAI (training)
1
Resources
node-red-contrib-simple-message-queue — npm install node-red-contrib-simple-message-queue · libregistry