@pauldeng/node-red-contrib-bullmq 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Duong Dinh Cuong
4
+ Copyright (c) 2026 Paul Deng
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,124 @@
1
+ # @pauldeng/node-red-contrib-bullmq
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@pauldeng/node-red-contrib-bullmq.svg)](https://www.npmjs.com/package/@pauldeng/node-red-contrib-bullmq)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@pauldeng/node-red-contrib-bullmq.svg)](https://www.npmjs.com/package/@pauldeng/node-red-contrib-bullmq)
5
+ [![CI](https://github.com/pauldeng/node-red-contrib-bullmq/actions/workflows/ci.yml/badge.svg)](https://github.com/pauldeng/node-red-contrib-bullmq/actions/workflows/ci.yml)
6
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/pauldeng/node-red-contrib-bullmq/badge)](https://scorecard.dev/viewer/?uri=github.com/pauldeng/node-red-contrib-bullmq)
7
+ [![License: MIT](https://img.shields.io/npm/l/@pauldeng/node-red-contrib-bullmq.svg)](LICENSE)
8
+
9
+ Node-RED nodes for BullMQ-backed Redis job queues.
10
+
11
+ This package targets BullMQ 5.78.0, Node-RED 4.1, and Node.js 18 or newer. It preserves the legacy `bull-queue-server`, `bull cmd`, and `bull run` node types where BullMQ has compatible behavior, and adds `bull job`, `bull events`, and `bull flow`.
12
+
13
+ ## Installation
14
+
15
+ ```sh
16
+ npm install @pauldeng/node-red-contrib-bullmq
17
+ ```
18
+
19
+ Repository: <https://github.com/pauldeng/node-red-contrib-bullmq>
20
+
21
+ ## Requirements
22
+
23
+ - Node.js 18+
24
+ - Node-RED 4.1.x
25
+ - Redis with `maxmemory-policy=noeviction`
26
+ - BullMQ 5.78.0
27
+
28
+ Bull v4 Redis data is not automatically migrated. Drain, retire, or otherwise handle old Bull queues before upgrading the runtime dependency.
29
+
30
+ ## Nodes
31
+
32
+ - `bull-queue-server`: shared BullMQ queue and Redis deployment config.
33
+ - `bull cmd`: message-driven producer and queue administration commands.
34
+ - `bull run`: BullMQ Worker that emits jobs into a Node-RED flow.
35
+ - `bull job`: manual acknowledgement and active-job actions for manual `bull run` flows.
36
+ - `bull events`: QueueEvents source node for global BullMQ events.
37
+ - `bull flow`: FlowProducer node for parent/child job trees.
38
+
39
+ ## Redis Deployments
40
+
41
+ Supported deployment modes:
42
+
43
+ - Standalone Redis
44
+ - Redis Cluster
45
+ - AWS MemoryDB, configured as Redis Cluster with TLS
46
+ - Redis Sentinel
47
+
48
+ Authentication can use Redis ACL username/password. TLS supports CA, client certificate, client key, server name, and certificate verification. Cluster and MemoryDB deployments should use a BullMQ prefix with a hash tag, such as `{bull}`, to keep queue keys in one Redis Cluster slot for atomic operations.
49
+
50
+ ## Legacy Repeat Cron Compatibility
51
+
52
+ The legacy repeat flow remains supported through BullMQ Job Schedulers:
53
+
54
+ ```js
55
+ msg.payload = "gateway-FCC23DFFFE0AA2A8";
56
+ msg.cmd = "add";
57
+ msg.jobopts = {
58
+ jobId: msg.payload,
59
+ repeat: {
60
+ cron: "30 9,19,29,39,49,59 * * * *",
61
+ },
62
+ };
63
+ return msg;
64
+ ```
65
+
66
+ The scheduler id is `msg.schedulerId` when present, otherwise `msg.jobopts.jobId`. `repeat.cron` is translated to `repeat.pattern`; conflicting `cron` and `pattern` values are rejected.
67
+
68
+ ## Commands
69
+
70
+ `bull cmd` reads `msg.cmd`. The default command is `add`.
71
+
72
+ Core supported command families include:
73
+
74
+ - add jobs, add bulk jobs, get jobs, retry jobs, remove jobs
75
+ - delayed jobs and delay promotion
76
+ - priorities and priority counts
77
+ - deduplication keys
78
+ - Job Scheduler commands and legacy repeat aliases
79
+ - pause, resume, drain, clean, and `stopAndRemoveAllJobs`
80
+ - global concurrency and rate limits
81
+ - job logs and Prometheus metrics export
82
+
83
+ See [docs/COMMANDS.md](docs/COMMANDS.md).
84
+
85
+ ## Unsupported
86
+
87
+ | BullMQ feature | Reason |
88
+ | -------------------------------------- | --------------------------------------------------------------------------------------------------------- |
89
+ | Sandboxed processors | They bypass the Node-RED flow and downstream acknowledgement model. |
90
+ | Custom JavaScript backoff strategies | Executable strategy code is not a safe Node-RED message contract. Use built-in fixed/exponential backoff. |
91
+ | BullMQ Pro features | Pro groups, batches, and observables are not part of the open-source BullMQ dependency. |
92
+ | Built-in dashboard | Use a dedicated queue UI; this package only provides Node-RED nodes. |
93
+ | Arbitrary method proxying | Unrestricted method dispatch is hard to validate, document, secure, and test. |
94
+ | Automatic Bull v4 Redis data migration | Bull and BullMQ do not provide a supported queue-data migration contract. |
95
+
96
+ ## Examples
97
+
98
+ Import [examples/example_flow.json](examples/example_flow.json) into Node-RED. It includes:
99
+
100
+ - simple add and run
101
+ - required `basecasts` scheduled job
102
+ - delayed and prioritized jobs
103
+ - manual acknowledgement
104
+ - QueueEvents
105
+ - parent/child flow producer
106
+
107
+ The examples do not contain secrets.
108
+
109
+ ## Development
110
+
111
+ ```sh
112
+ npm install
113
+ npm test
114
+ ```
115
+
116
+ Use [docs/TESTING.md](docs/TESTING.md) for Docker, Playwright, and MemoryDB test plans. Use [docs/CHANGE_WORKFLOW.md](docs/CHANGE_WORKFLOW.md) before changing behavior.
117
+
118
+ ## More Docs
119
+
120
+ - [Architecture](docs/ARCHITECTURE.md)
121
+ - [Node Guide](docs/NODE_GUIDE.md)
122
+ - [Connection Guide](docs/CONNECTIONS.md)
123
+ - [Migration Guide](docs/MIGRATION.md)
124
+ - [Troubleshooting](docs/TROUBLESHOOTING.md)