node-red-contrib-qrusty
v0.20.9
Published
Node-RED nodes for the Qrusty priority queue server
Maintainers
Readme
node-red-contrib-qrusty
Node-RED custom nodes for the Qrusty priority queue server.
Wraps the qrusty-client
Node.js client in fully-typed, HTML-templated Node-RED nodes so you can
drag-and-drop queue operations into your flows instead of hand-rolling
function nodes.
Install
From the Node-RED palette manager, search for node-red-contrib-qrusty
and install. Or from the command line in your Node-RED user directory
(typically ~/.node-red):
npm install node-red-contrib-qrustyRequires Node.js 18 or newer and Node-RED 3.0 or newer.
Nodes
One config node plus 17 action nodes. All action nodes reference a
shared qrusty-server config node so you only enter the host/port once
per environment.
Config node
| Node | Purpose |
| --------------- | ----------------------------------------------------------------------------------------------- |
| qrusty-server | Holds host, port, and useHttps for a Qrusty server. Computes baseUrl = http(s)://host:port. |
Message operations
| Node | HTTP endpoint | Purpose |
| ------------------- | ------------------------- | -------------------------------------- |
| qrusty-publish | POST /publish | Publish msg.payload to a queue. |
| qrusty-consume | POST /consume/:queue | Pop one message (or null). |
| qrusty-ack | POST /ack/:queue/:id | Acknowledge a message. |
| qrusty-nack | POST /nack/:queue/:id | Negatively acknowledge (retry or DLQ). |
| qrusty-ack-batch | POST /ack-batch/:queue | Ack many ids in one request. |
| qrusty-nack-batch | POST /nack-batch/:queue | Nack many ids in one request. |
Queue management
| Node | HTTP endpoint | Purpose |
| --------------------- | ----------------------------- | ------------------------------------------------ |
| qrusty-create-queue | POST /create-queue | Create a queue with ordering / duplicate policy. |
| qrusty-update-queue | POST /update-queue | Rename or toggle duplicate protection. |
| qrusty-delete-queue | DELETE /delete-queue/:queue | Delete a queue and its messages. |
| qrusty-purge-queue | POST /purge-queue/:queue | Empty a queue without deleting it. |
| qrusty-purge-all | POST /purge-all | Empty every queue. |
| qrusty-delete-all | POST /delete-all | Delete every queue. |
Observability
| Node | HTTP endpoint | Purpose |
| ---------------------- | ---------------------------- | -------------------------------- |
| qrusty-stats | GET /stats | Aggregate stats for every queue. |
| qrusty-queue-stats | GET /queue-stats/:queue | Detailed stats for one queue. |
| qrusty-queue-metrics | GET /queues/:queue/metrics | Per-second time-series metrics. |
| qrusty-list-queues | GET /queues | Names of all existing queues. |
| qrusty-health | GET /health | Server health check. |
Config-vs-msg fallback
Every action node supports two ways of supplying its parameters:
- In the editor panel — values set on the node itself (e.g. a hard-coded
queuefield) take precedence. - At runtime via the incoming
msg— leave the field blank on the node and supplymsg.queue,msg.priority, etc.
This lets you build generic flows (msg.queue decided upstream) or
explicit flows (queue pinned in the editor), or a mix of both.
Error handling
- A green status dot with
"ok"means the HTTP call succeeded. - A blue dot with
"requesting"shows the call is in flight. - A red ring with
"HTTP 4xx"/"HTTP 5xx"/"no server config"means the node failed; the error is forwarded viadone(err)so a downstreamcatchnode will pick it up.
Example flow
[
{
"id": "srv",
"type": "qrusty-server",
"name": "dev",
"host": "localhost",
"port": "6784",
"useHttps": false
},
{
"id": "inject",
"type": "inject",
"payload": "hello from node-red",
"payloadType": "str",
"wires": [["pub"]]
},
{
"id": "pub",
"type": "qrusty-publish",
"name": "",
"server": "srv",
"queue": "orders",
"priority": "10",
"wires": [[]]
}
]Development
cd integrations/node-red
npm install
npm test # runs mocha against node-red-node-test-helperThe test suite in test/ uses the official
node-red-node-test-helper
to load every node into a real Node-RED runtime and exercise it end-to-end
against a mocked HTTP server.
Versioning
This package tracks the Qrusty server version. When the server bumps
(e.g. 0.19.x), this package is bumped in lockstep and its
qrusty-client dependency is pinned to the matching major.minor.
