@yroshcha/node-red-contrib-redis-full 1.0.8 → 2.0.1
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/CHANGELOG.md +23 -0
- package/README.md +3 -1
- package/examples/redis-basics.json +169 -0
- package/examples/redis-stream-operations.json +216 -0
- package/examples/redis-streams.json +163 -0
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## 2.0.1 — 2026-09-07
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added importable examples for every public palette node: Redis basics, Streams consumption, and Streams operations. This satisfies the Flow Library scorecard rule that every non-config node appears in an example flow.
|
|
10
|
+
|
|
11
|
+
## 2.0.0 — 2026-09-07
|
|
12
|
+
|
|
13
|
+
### Breaking changes
|
|
14
|
+
|
|
15
|
+
- The minimum supported Node.js version is now 20 and the minimum supported Node-RED version is now 4. This aligns the package with `ioredis` 6.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Updated `ioredis` to the current 6.x release line.
|
|
20
|
+
- Added an importable Redis Streams example flow (`XADD → XREADGROUP → XACK`) for the Node-RED library.
|
|
21
|
+
|
|
22
|
+
## 1.0.9 — 2026-09-07
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- Declared the supported Node-RED runtime range in the package metadata so the Flow Library scorecard and Palette Manager can evaluate compatibility correctly.
|
|
27
|
+
|
|
5
28
|
## 1.0.8 — 2026-08-12
|
|
6
29
|
|
|
7
30
|
### Fixed
|
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ For a local archive, use `npm install /path/to/yroshcha-node-red-contrib-redis-f
|
|
|
45
45
|
|
|
46
46
|
## Release status
|
|
47
47
|
|
|
48
|
-
**`
|
|
48
|
+
**`2.0.1` is the current stable release.** See [CHANGELOG.md](CHANGELOG.md) for release notes and compatibility information.
|
|
49
49
|
|
|
50
50
|
## Production profile
|
|
51
51
|
|
|
@@ -124,6 +124,8 @@ Run `redis consumer gc` from an input message, typically a scheduled Inject node
|
|
|
124
124
|
|
|
125
125
|
## Example flow
|
|
126
126
|
|
|
127
|
+
After installing the palette, open **Import → Examples**. The package provides short, self-contained flows for Redis basics, Redis Streams consumption, and Redis Streams operations. They use a local Redis configuration and `example:*` keys so you can inspect and adapt them safely.
|
|
128
|
+
|
|
127
129
|
```
|
|
128
130
|
[yroshcha-redis-config] ← shared configuration for all nodes below
|
|
129
131
|
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "redis-basics-example-tab",
|
|
4
|
+
"type": "tab",
|
|
5
|
+
"label": "Redis basics",
|
|
6
|
+
"disabled": false,
|
|
7
|
+
"info": "Short, independent examples for commands, transactions, scanning, and Pub/Sub. Set the config node to a Redis server before deploying."
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"id": "redis-basics-example-note",
|
|
11
|
+
"type": "comment",
|
|
12
|
+
"z": "redis-basics-example-tab",
|
|
13
|
+
"name": "Redis basics: command, MULTI/EXEC, SCAN, and Pub/Sub",
|
|
14
|
+
"info": "Each branch is independent. Click its Inject node after configuring Redis. The subscription starts when the flow is deployed and writes received messages to Debug.",
|
|
15
|
+
"x": 340,
|
|
16
|
+
"y": 60,
|
|
17
|
+
"wires": []
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "redis-basics-example-config",
|
|
21
|
+
"type": "yroshcha-redis-config",
|
|
22
|
+
"name": "Local Redis",
|
|
23
|
+
"host": "127.0.0.1",
|
|
24
|
+
"port": "6379",
|
|
25
|
+
"db": "0",
|
|
26
|
+
"username": "",
|
|
27
|
+
"tls": false,
|
|
28
|
+
"cluster": false,
|
|
29
|
+
"connectTimeout": "10000",
|
|
30
|
+
"commandTimeout": "30000",
|
|
31
|
+
"retryMaxDelay": "30000"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "redis-basics-ping-inject",
|
|
35
|
+
"type": "inject",
|
|
36
|
+
"z": "redis-basics-example-tab",
|
|
37
|
+
"name": "Run PING",
|
|
38
|
+
"props": [{ "p": "payload" }],
|
|
39
|
+
"payload": "",
|
|
40
|
+
"payloadType": "date",
|
|
41
|
+
"x": 130,
|
|
42
|
+
"y": 140,
|
|
43
|
+
"wires": [["redis-basics-ping"]]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "redis-basics-ping",
|
|
47
|
+
"type": "yroshcha-redis-command",
|
|
48
|
+
"z": "redis-basics-example-tab",
|
|
49
|
+
"name": "PING",
|
|
50
|
+
"server": "redis-basics-example-config",
|
|
51
|
+
"command": "PING",
|
|
52
|
+
"allowMsgCommand": false,
|
|
53
|
+
"block": false,
|
|
54
|
+
"x": 320,
|
|
55
|
+
"y": 140,
|
|
56
|
+
"wires": [["redis-basics-ping-debug"]]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "redis-basics-ping-debug",
|
|
60
|
+
"type": "debug",
|
|
61
|
+
"z": "redis-basics-example-tab",
|
|
62
|
+
"name": "PING result",
|
|
63
|
+
"active": true,
|
|
64
|
+
"tosidebar": true,
|
|
65
|
+
"complete": "payload",
|
|
66
|
+
"targetType": "msg",
|
|
67
|
+
"x": 500,
|
|
68
|
+
"y": 140,
|
|
69
|
+
"wires": []
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "redis-basics-multi-inject",
|
|
73
|
+
"type": "inject",
|
|
74
|
+
"z": "redis-basics-example-tab",
|
|
75
|
+
"name": "Run transaction",
|
|
76
|
+
"props": [{ "p": "commands", "v": "[[\"set\",\"example:counter\",\"0\"],[\"incr\",\"example:counter\"]]", "vt": "json" }],
|
|
77
|
+
"x": 140,
|
|
78
|
+
"y": 200,
|
|
79
|
+
"wires": [["redis-basics-multi"]]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "redis-basics-multi",
|
|
83
|
+
"type": "yroshcha-redis-multi",
|
|
84
|
+
"z": "redis-basics-example-tab",
|
|
85
|
+
"name": "MULTI / EXEC",
|
|
86
|
+
"server": "redis-basics-example-config",
|
|
87
|
+
"x": 330,
|
|
88
|
+
"y": 200,
|
|
89
|
+
"wires": [["redis-basics-multi-debug"]]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "redis-basics-multi-debug",
|
|
93
|
+
"type": "debug",
|
|
94
|
+
"z": "redis-basics-example-tab",
|
|
95
|
+
"name": "Transaction result",
|
|
96
|
+
"active": true,
|
|
97
|
+
"tosidebar": true,
|
|
98
|
+
"complete": "payload",
|
|
99
|
+
"targetType": "msg",
|
|
100
|
+
"x": 520,
|
|
101
|
+
"y": 200,
|
|
102
|
+
"wires": []
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"id": "redis-basics-scan-inject",
|
|
106
|
+
"type": "inject",
|
|
107
|
+
"z": "redis-basics-example-tab",
|
|
108
|
+
"name": "Scan keys",
|
|
109
|
+
"props": [{ "p": "payload" }],
|
|
110
|
+
"payload": "",
|
|
111
|
+
"payloadType": "date",
|
|
112
|
+
"x": 130,
|
|
113
|
+
"y": 260,
|
|
114
|
+
"wires": [["redis-basics-scan"]]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"id": "redis-basics-scan",
|
|
118
|
+
"type": "yroshcha-redis-scan",
|
|
119
|
+
"z": "redis-basics-example-tab",
|
|
120
|
+
"name": "SCAN up to 100 keys",
|
|
121
|
+
"server": "redis-basics-example-config",
|
|
122
|
+
"scanType": "SCAN",
|
|
123
|
+
"count": "100",
|
|
124
|
+
"maxResults": "100",
|
|
125
|
+
"x": 345,
|
|
126
|
+
"y": 260,
|
|
127
|
+
"wires": [["redis-basics-scan-debug"]]
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"id": "redis-basics-scan-debug",
|
|
131
|
+
"type": "debug",
|
|
132
|
+
"z": "redis-basics-example-tab",
|
|
133
|
+
"name": "Keys",
|
|
134
|
+
"active": true,
|
|
135
|
+
"tosidebar": true,
|
|
136
|
+
"complete": "payload",
|
|
137
|
+
"targetType": "msg",
|
|
138
|
+
"x": 510,
|
|
139
|
+
"y": 260,
|
|
140
|
+
"wires": []
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"id": "redis-basics-subscribe",
|
|
144
|
+
"type": "yroshcha-redis-subscribe",
|
|
145
|
+
"z": "redis-basics-example-tab",
|
|
146
|
+
"name": "Subscribe example:notifications",
|
|
147
|
+
"server": "redis-basics-example-config",
|
|
148
|
+
"mode": "subscribe",
|
|
149
|
+
"channels": "example:notifications",
|
|
150
|
+
"topic": "",
|
|
151
|
+
"timeout": "0",
|
|
152
|
+
"x": 240,
|
|
153
|
+
"y": 340,
|
|
154
|
+
"wires": [["redis-basics-subscribe-debug"]]
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"id": "redis-basics-subscribe-debug",
|
|
158
|
+
"type": "debug",
|
|
159
|
+
"z": "redis-basics-example-tab",
|
|
160
|
+
"name": "Received notification",
|
|
161
|
+
"active": true,
|
|
162
|
+
"tosidebar": true,
|
|
163
|
+
"complete": "true",
|
|
164
|
+
"targetType": "full",
|
|
165
|
+
"x": 515,
|
|
166
|
+
"y": 340,
|
|
167
|
+
"wires": []
|
|
168
|
+
}
|
|
169
|
+
]
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "redis-stream-ops-example-tab",
|
|
4
|
+
"type": "tab",
|
|
5
|
+
"label": "Redis Streams operations",
|
|
6
|
+
"disabled": false,
|
|
7
|
+
"info": "On-demand operational flows for a Redis Streams consumer group. Configure the stream and group names before using any Inject node."
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"id": "redis-stream-ops-example-note",
|
|
11
|
+
"type": "comment",
|
|
12
|
+
"z": "redis-stream-ops-example-tab",
|
|
13
|
+
"name": "Redis Streams operations: metrics, recovery, consumer cleanup, and control",
|
|
14
|
+
"info": "Set the Redis config and example:events/example-workers values to match an existing stream and consumer group. These nodes run only when their Inject node is clicked. The HTTP API remains disabled until explicitly enabled in its edit dialog.",
|
|
15
|
+
"x": 390,
|
|
16
|
+
"y": 60,
|
|
17
|
+
"wires": []
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "redis-stream-ops-example-config",
|
|
21
|
+
"type": "yroshcha-redis-config",
|
|
22
|
+
"name": "Local Redis",
|
|
23
|
+
"host": "127.0.0.1",
|
|
24
|
+
"port": "6379",
|
|
25
|
+
"db": "0",
|
|
26
|
+
"username": "",
|
|
27
|
+
"tls": false,
|
|
28
|
+
"cluster": false,
|
|
29
|
+
"connectTimeout": "10000",
|
|
30
|
+
"commandTimeout": "30000",
|
|
31
|
+
"retryMaxDelay": "30000"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "redis-stream-ops-metrics-inject",
|
|
35
|
+
"type": "inject",
|
|
36
|
+
"z": "redis-stream-ops-example-tab",
|
|
37
|
+
"name": "Collect metrics",
|
|
38
|
+
"props": [{ "p": "payload" }],
|
|
39
|
+
"payload": "",
|
|
40
|
+
"payloadType": "date",
|
|
41
|
+
"x": 125,
|
|
42
|
+
"y": 140,
|
|
43
|
+
"wires": [["redis-stream-ops-metrics"]]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "redis-stream-ops-metrics",
|
|
47
|
+
"type": "yroshcha-redis-stream-metrics",
|
|
48
|
+
"z": "redis-stream-ops-example-tab",
|
|
49
|
+
"name": "Metrics for example-workers",
|
|
50
|
+
"server": "redis-stream-ops-example-config",
|
|
51
|
+
"streamKey": "example:events",
|
|
52
|
+
"group": "example-workers",
|
|
53
|
+
"deadLetterStream": "",
|
|
54
|
+
"x": 350,
|
|
55
|
+
"y": 140,
|
|
56
|
+
"wires": [["redis-stream-ops-metrics-debug"]]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "redis-stream-ops-metrics-debug",
|
|
60
|
+
"type": "debug",
|
|
61
|
+
"z": "redis-stream-ops-example-tab",
|
|
62
|
+
"name": "Metrics",
|
|
63
|
+
"active": true,
|
|
64
|
+
"tosidebar": true,
|
|
65
|
+
"complete": "payload",
|
|
66
|
+
"targetType": "msg",
|
|
67
|
+
"x": 560,
|
|
68
|
+
"y": 140,
|
|
69
|
+
"wires": []
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "redis-stream-ops-claim-inject",
|
|
73
|
+
"type": "inject",
|
|
74
|
+
"z": "redis-stream-ops-example-tab",
|
|
75
|
+
"name": "Recover idle pending entries",
|
|
76
|
+
"props": [{ "p": "payload" }],
|
|
77
|
+
"payload": "",
|
|
78
|
+
"payloadType": "date",
|
|
79
|
+
"x": 165,
|
|
80
|
+
"y": 200,
|
|
81
|
+
"wires": [["redis-stream-ops-claim"]]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"id": "redis-stream-ops-claim",
|
|
85
|
+
"type": "yroshcha-redis-stream-claim",
|
|
86
|
+
"z": "redis-stream-ops-example-tab",
|
|
87
|
+
"name": "Claim entries idle for 60s",
|
|
88
|
+
"server": "redis-stream-ops-example-config",
|
|
89
|
+
"streamKey": "example:events",
|
|
90
|
+
"group": "example-workers",
|
|
91
|
+
"consumer": "recovery-worker",
|
|
92
|
+
"minIdleMs": "60000",
|
|
93
|
+
"count": "100",
|
|
94
|
+
"maxMessages": "1000",
|
|
95
|
+
"x": 410,
|
|
96
|
+
"y": 200,
|
|
97
|
+
"wires": [["redis-stream-ops-claim-debug"]]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "redis-stream-ops-claim-debug",
|
|
101
|
+
"type": "debug",
|
|
102
|
+
"z": "redis-stream-ops-example-tab",
|
|
103
|
+
"name": "Claimed entries",
|
|
104
|
+
"active": true,
|
|
105
|
+
"tosidebar": true,
|
|
106
|
+
"complete": "payload",
|
|
107
|
+
"targetType": "msg",
|
|
108
|
+
"x": 625,
|
|
109
|
+
"y": 200,
|
|
110
|
+
"wires": []
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"id": "redis-stream-ops-gc-inject",
|
|
114
|
+
"type": "inject",
|
|
115
|
+
"z": "redis-stream-ops-example-tab",
|
|
116
|
+
"name": "Remove idle consumers",
|
|
117
|
+
"props": [{ "p": "payload" }],
|
|
118
|
+
"payload": "",
|
|
119
|
+
"payloadType": "date",
|
|
120
|
+
"x": 145,
|
|
121
|
+
"y": 260,
|
|
122
|
+
"wires": [["redis-stream-ops-gc"]]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"id": "redis-stream-ops-gc",
|
|
126
|
+
"type": "yroshcha-redis-stream-gc",
|
|
127
|
+
"z": "redis-stream-ops-example-tab",
|
|
128
|
+
"name": "Clean consumers idle for 10 min",
|
|
129
|
+
"server": "redis-stream-ops-example-config",
|
|
130
|
+
"streamKey": "example:events",
|
|
131
|
+
"group": "example-workers",
|
|
132
|
+
"minIdleMs": "600000",
|
|
133
|
+
"x": 405,
|
|
134
|
+
"y": 260,
|
|
135
|
+
"wires": [["redis-stream-ops-gc-debug"]]
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"id": "redis-stream-ops-gc-debug",
|
|
139
|
+
"type": "debug",
|
|
140
|
+
"z": "redis-stream-ops-example-tab",
|
|
141
|
+
"name": "Cleanup result",
|
|
142
|
+
"active": true,
|
|
143
|
+
"tosidebar": true,
|
|
144
|
+
"complete": "payload",
|
|
145
|
+
"targetType": "msg",
|
|
146
|
+
"x": 625,
|
|
147
|
+
"y": 260,
|
|
148
|
+
"wires": []
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"id": "redis-stream-ops-pause-inject",
|
|
152
|
+
"type": "inject",
|
|
153
|
+
"z": "redis-stream-ops-example-tab",
|
|
154
|
+
"name": "Pause local consumers",
|
|
155
|
+
"props": [{ "p": "action", "v": "pause", "vt": "str" }],
|
|
156
|
+
"x": 145,
|
|
157
|
+
"y": 340,
|
|
158
|
+
"wires": [["redis-stream-ops-control"]]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"id": "redis-stream-ops-resume-inject",
|
|
162
|
+
"type": "inject",
|
|
163
|
+
"z": "redis-stream-ops-example-tab",
|
|
164
|
+
"name": "Resume local consumers",
|
|
165
|
+
"props": [{ "p": "action", "v": "resume", "vt": "str" }],
|
|
166
|
+
"x": 145,
|
|
167
|
+
"y": 390,
|
|
168
|
+
"wires": [["redis-stream-ops-control"]]
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"id": "redis-stream-ops-control",
|
|
172
|
+
"type": "yroshcha-redis-stream-control",
|
|
173
|
+
"z": "redis-stream-ops-example-tab",
|
|
174
|
+
"name": "Control local xreadgroup nodes",
|
|
175
|
+
"x": 405,
|
|
176
|
+
"y": 365,
|
|
177
|
+
"wires": [["redis-stream-ops-control-debug"]]
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"id": "redis-stream-ops-control-debug",
|
|
181
|
+
"type": "debug",
|
|
182
|
+
"z": "redis-stream-ops-example-tab",
|
|
183
|
+
"name": "Control result",
|
|
184
|
+
"active": true,
|
|
185
|
+
"tosidebar": true,
|
|
186
|
+
"complete": "payload",
|
|
187
|
+
"targetType": "msg",
|
|
188
|
+
"x": 645,
|
|
189
|
+
"y": 365,
|
|
190
|
+
"wires": []
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"id": "redis-stream-ops-api",
|
|
194
|
+
"type": "yroshcha-redis-stream-api",
|
|
195
|
+
"z": "redis-stream-ops-example-tab",
|
|
196
|
+
"name": "Optional Streams HTTP API (disabled)",
|
|
197
|
+
"enabled": false,
|
|
198
|
+
"requireToken": false,
|
|
199
|
+
"x": 265,
|
|
200
|
+
"y": 460,
|
|
201
|
+
"wires": [["redis-stream-ops-api-debug"]]
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"id": "redis-stream-ops-api-debug",
|
|
205
|
+
"type": "debug",
|
|
206
|
+
"z": "redis-stream-ops-example-tab",
|
|
207
|
+
"name": "HTTP API result",
|
|
208
|
+
"active": true,
|
|
209
|
+
"tosidebar": true,
|
|
210
|
+
"complete": "payload",
|
|
211
|
+
"targetType": "msg",
|
|
212
|
+
"x": 540,
|
|
213
|
+
"y": 460,
|
|
214
|
+
"wires": []
|
|
215
|
+
}
|
|
216
|
+
]
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "redis-streams-example-tab",
|
|
4
|
+
"type": "tab",
|
|
5
|
+
"label": "Redis Streams example",
|
|
6
|
+
"disabled": false,
|
|
7
|
+
"info": "Publish an example event, consume it with a Redis consumer group, then ACK it after processing."
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"id": "redis-streams-example-note",
|
|
11
|
+
"type": "comment",
|
|
12
|
+
"z": "redis-streams-example-tab",
|
|
13
|
+
"name": "Redis Streams: XADD → XREADGROUP → XACK",
|
|
14
|
+
"info": "Set the Redis config node to your Redis server. Click Publish example event. The consumer group is created automatically and the event is acknowledged after the processing function completes.",
|
|
15
|
+
"x": 310,
|
|
16
|
+
"y": 60,
|
|
17
|
+
"wires": []
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "redis-streams-example-config",
|
|
21
|
+
"type": "yroshcha-redis-config",
|
|
22
|
+
"name": "Local Redis",
|
|
23
|
+
"host": "127.0.0.1",
|
|
24
|
+
"port": "6379",
|
|
25
|
+
"db": "0",
|
|
26
|
+
"username": "",
|
|
27
|
+
"tls": false,
|
|
28
|
+
"cluster": false,
|
|
29
|
+
"connectTimeout": "10000",
|
|
30
|
+
"commandTimeout": "30000",
|
|
31
|
+
"retryMaxDelay": "30000"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "redis-streams-example-inject",
|
|
35
|
+
"type": "inject",
|
|
36
|
+
"z": "redis-streams-example-tab",
|
|
37
|
+
"name": "Publish example event",
|
|
38
|
+
"props": [{ "p": "payload" }],
|
|
39
|
+
"repeat": "",
|
|
40
|
+
"crontab": "",
|
|
41
|
+
"once": false,
|
|
42
|
+
"onceDelay": 0.1,
|
|
43
|
+
"topic": "",
|
|
44
|
+
"payload": "{\"eventType\":\"example.created\",\"event\":{\"id\":\"example-1\",\"message\":\"Hello Redis Streams\"}}",
|
|
45
|
+
"payloadType": "json",
|
|
46
|
+
"x": 160,
|
|
47
|
+
"y": 140,
|
|
48
|
+
"wires": [["redis-streams-example-out"]]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "redis-streams-example-out",
|
|
52
|
+
"type": "yroshcha-redis-stream-out",
|
|
53
|
+
"z": "redis-streams-example-tab",
|
|
54
|
+
"name": "XADD example:events",
|
|
55
|
+
"server": "redis-streams-example-config",
|
|
56
|
+
"streamKey": "example:events",
|
|
57
|
+
"maxlen": "",
|
|
58
|
+
"approxTrim": true,
|
|
59
|
+
"unsafeTrim": false,
|
|
60
|
+
"x": 400,
|
|
61
|
+
"y": 140,
|
|
62
|
+
"wires": [["redis-streams-example-published"]]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "redis-streams-example-published",
|
|
66
|
+
"type": "debug",
|
|
67
|
+
"z": "redis-streams-example-tab",
|
|
68
|
+
"name": "Published stream ID",
|
|
69
|
+
"active": true,
|
|
70
|
+
"tosidebar": true,
|
|
71
|
+
"console": false,
|
|
72
|
+
"tostatus": false,
|
|
73
|
+
"complete": "streamId",
|
|
74
|
+
"targetType": "msg",
|
|
75
|
+
"statusVal": "",
|
|
76
|
+
"statusType": "auto",
|
|
77
|
+
"x": 650,
|
|
78
|
+
"y": 140,
|
|
79
|
+
"wires": []
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "redis-streams-example-in",
|
|
83
|
+
"type": "yroshcha-redis-stream-in",
|
|
84
|
+
"z": "redis-streams-example-tab",
|
|
85
|
+
"name": "XREADGROUP example-workers",
|
|
86
|
+
"server": "redis-streams-example-config",
|
|
87
|
+
"streamKey": "example:events",
|
|
88
|
+
"group": "example-workers",
|
|
89
|
+
"consumer": "",
|
|
90
|
+
"count": "100",
|
|
91
|
+
"blockMs": "5000",
|
|
92
|
+
"readIntervalMs": "0",
|
|
93
|
+
"rateLimitPerSecond": "0",
|
|
94
|
+
"batchWindowMs": "0",
|
|
95
|
+
"batchIntervalMs": "0",
|
|
96
|
+
"autoAck": false,
|
|
97
|
+
"startPaused": false,
|
|
98
|
+
"startId": "$",
|
|
99
|
+
"maxPending": "1000",
|
|
100
|
+
"capacityPollMs": "500",
|
|
101
|
+
"capacityCheckIntervalMs": "250",
|
|
102
|
+
"autoClaim": true,
|
|
103
|
+
"reclaimIdleMs": "60000",
|
|
104
|
+
"reclaimIntervalMs": "30000",
|
|
105
|
+
"reclaimCount": "100",
|
|
106
|
+
"maxDeliveries": "5",
|
|
107
|
+
"deadLetterStream": "",
|
|
108
|
+
"initialBackoffMs": "500",
|
|
109
|
+
"maxBackoffMs": "30000",
|
|
110
|
+
"backoffMultiplier": "2",
|
|
111
|
+
"pelAlertThreshold": "0",
|
|
112
|
+
"pelCheckIntervalMs": "30000",
|
|
113
|
+
"x": 190,
|
|
114
|
+
"y": 260,
|
|
115
|
+
"wires": [["redis-streams-example-process"]]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"id": "redis-streams-example-process",
|
|
119
|
+
"type": "function",
|
|
120
|
+
"z": "redis-streams-example-tab",
|
|
121
|
+
"name": "Business logic (replace me)",
|
|
122
|
+
"func": "// Do business work here.\n// ACK only after this succeeds.\nreturn msg;",
|
|
123
|
+
"outputs": 1,
|
|
124
|
+
"timeout": 0,
|
|
125
|
+
"noerr": 0,
|
|
126
|
+
"initialize": "",
|
|
127
|
+
"finalize": "",
|
|
128
|
+
"libs": [],
|
|
129
|
+
"x": 445,
|
|
130
|
+
"y": 260,
|
|
131
|
+
"wires": [["redis-streams-example-ack"]]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"id": "redis-streams-example-ack",
|
|
135
|
+
"type": "yroshcha-redis-stream-ack",
|
|
136
|
+
"z": "redis-streams-example-tab",
|
|
137
|
+
"name": "ACK after success",
|
|
138
|
+
"server": "redis-streams-example-config",
|
|
139
|
+
"streamKey": "",
|
|
140
|
+
"group": "",
|
|
141
|
+
"deleteAfterAck": false,
|
|
142
|
+
"x": 665,
|
|
143
|
+
"y": 260,
|
|
144
|
+
"wires": [["redis-streams-example-acked"]]
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"id": "redis-streams-example-acked",
|
|
148
|
+
"type": "debug",
|
|
149
|
+
"z": "redis-streams-example-tab",
|
|
150
|
+
"name": "ACK result",
|
|
151
|
+
"active": true,
|
|
152
|
+
"tosidebar": true,
|
|
153
|
+
"console": false,
|
|
154
|
+
"tostatus": false,
|
|
155
|
+
"complete": "acked",
|
|
156
|
+
"targetType": "msg",
|
|
157
|
+
"statusVal": "",
|
|
158
|
+
"statusType": "auto",
|
|
159
|
+
"x": 865,
|
|
160
|
+
"y": 260,
|
|
161
|
+
"wires": []
|
|
162
|
+
}
|
|
163
|
+
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yroshcha/node-red-contrib-redis-full",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Production-oriented Redis palette for Node-RED: generic commands, Pub/Sub, scans, transactions, and Redis Streams consumer groups.",
|
|
5
5
|
"keywords": ["node-red", "redis", "redis-streams", "pubsub", "xadd", "xreadgroup", "ioredis"],
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
},
|
|
15
15
|
"homepage": "https://github.com/yroshcha/node-red-contrib-redis-full#readme",
|
|
16
16
|
"main": "redis.js",
|
|
17
|
-
"files": ["redis.js", "redis.html", "README.md", "CHANGELOG.md", "LICENSE", "icons"],
|
|
17
|
+
"files": ["redis.js", "redis.html", "README.md", "CHANGELOG.md", "LICENSE", "icons", "examples"],
|
|
18
18
|
"engines": {
|
|
19
|
-
"node": ">=
|
|
19
|
+
"node": ">=20"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"node-red": ">=
|
|
22
|
+
"node-red": ">=4 <6"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"test": "node --test test/*.test.js",
|
|
@@ -28,9 +28,10 @@
|
|
|
28
28
|
"prepublishOnly": "npm run check"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"ioredis": "^
|
|
31
|
+
"ioredis": "^6.0.0"
|
|
32
32
|
},
|
|
33
33
|
"node-red": {
|
|
34
|
+
"version": ">=4.0.0 <6.0.0",
|
|
34
35
|
"nodes": {
|
|
35
36
|
"yroshcha-redis": "redis.js"
|
|
36
37
|
}
|