node-red-contrib-qrusty 0.17.2 → 0.17.4

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/README.md CHANGED
@@ -11,3 +11,18 @@ Node-RED Function node snippets for interacting with a Qrusty server.
11
11
 
12
12
  - `qrusty-publish.js` (POST `/publish`)
13
13
  - `qrusty-consume.js` (POST `/consume/{queue}`)
14
+ - `qrusty-ack.js` (POST `/ack/{queue}/{id}`)
15
+ - `qrusty-nack.js` (POST `/nack/{queue}/{id}`)
16
+ - `qrusty-create-queue.js` (POST `/create-queue`)
17
+ - `qrusty-update-queue.js` (POST `/update-queue`)
18
+ - `qrusty-delete-queue.js` (DELETE `/delete-queue/{queue}`)
19
+ - `qrusty-purge-queue.js` (POST `/purge-queue/{queue}`)
20
+ - `qrusty-stats.js` (GET `/stats`)
21
+ - `qrusty-queue-stats.js` (GET `/queue-stats/{queue}`)
22
+ - `qrusty-queue-metrics.js` (GET `/queues/{queue}/metrics`)
23
+ - `qrusty-list-queues.js` (GET `/queues`)
24
+ - `qrusty-purge-all.js` (POST `/purge-all`)
25
+ - `qrusty-delete-all.js` (POST `/delete-all`)
26
+ - `qrusty-ack-batch.js` (POST `/ack-batch/{queue}`)
27
+ - `qrusty-nack-batch.js` (POST `/nack-batch/{queue}`)
28
+ - `qrusty-health.js` (GET `/health`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-qrusty",
3
- "version": "0.17.2",
3
+ "version": "0.17.4",
4
4
  "description": "Node-RED nodes for Qrusty priority queue server",
5
5
  "author": "Gordon Greene <greeng3@obscure-reference.com>",
6
6
  "license": "MIT",
@@ -13,7 +13,22 @@
13
13
  "node-red": {
14
14
  "nodes": {
15
15
  "qrusty-publish": "qrusty-publish.js",
16
- "qrusty-consume": "qrusty-consume.js"
16
+ "qrusty-consume": "qrusty-consume.js",
17
+ "qrusty-ack": "qrusty-ack.js",
18
+ "qrusty-nack": "qrusty-nack.js",
19
+ "qrusty-create-queue": "qrusty-create-queue.js",
20
+ "qrusty-update-queue": "qrusty-update-queue.js",
21
+ "qrusty-delete-queue": "qrusty-delete-queue.js",
22
+ "qrusty-purge-queue": "qrusty-purge-queue.js",
23
+ "qrusty-stats": "qrusty-stats.js",
24
+ "qrusty-queue-stats": "qrusty-queue-stats.js",
25
+ "qrusty-queue-metrics": "qrusty-queue-metrics.js",
26
+ "qrusty-list-queues": "qrusty-list-queues.js",
27
+ "qrusty-purge-all": "qrusty-purge-all.js",
28
+ "qrusty-delete-all": "qrusty-delete-all.js",
29
+ "qrusty-ack-batch": "qrusty-ack-batch.js",
30
+ "qrusty-nack-batch": "qrusty-nack-batch.js",
31
+ "qrusty-health": "qrusty-health.js"
17
32
  }
18
33
  }
19
34
  }
@@ -0,0 +1,10 @@
1
+ // Function node for batch-acknowledging messages in qrusty
2
+ msg.url =
3
+ "http://queue-server:6784/ack-batch/" + (msg.queue || "default_queue");
4
+ msg.method = "POST";
5
+ msg.payload = {
6
+ consumer_id: msg.consumer_id || "node-red-consumer",
7
+ message_ids: msg.messageIds || [],
8
+ };
9
+ msg.headers = { "Content-Type": "application/json" };
10
+ return msg;
package/qrusty-ack.js ADDED
@@ -0,0 +1,12 @@
1
+ // Function node for acknowledging a message in qrusty
2
+ msg.url =
3
+ "http://queue-server:6784/ack/" +
4
+ (msg.queue || "default_queue") +
5
+ "/" +
6
+ msg.messageId;
7
+ msg.method = "POST";
8
+ msg.payload = {
9
+ consumer_id: msg.consumer_id || "node-red-consumer",
10
+ };
11
+ msg.headers = { "Content-Type": "application/json" };
12
+ return msg;
@@ -0,0 +1,14 @@
1
+ // Function node for creating a queue in qrusty
2
+ msg.url = "http://queue-server:6784/create-queue";
3
+ msg.method = "POST";
4
+ msg.payload = {
5
+ name: msg.queue || "my_queue",
6
+ config: {
7
+ ordering: msg.ordering || "MaxFirst",
8
+ allow_duplicates:
9
+ msg.allow_duplicates !== undefined ? msg.allow_duplicates : true,
10
+ priority_kind: msg.priority_kind || "Numeric",
11
+ },
12
+ };
13
+ msg.headers = { "Content-Type": "application/json" };
14
+ return msg;
@@ -0,0 +1,5 @@
1
+ // Function node for deleting all queues and their messages in qrusty
2
+ msg.url = "http://queue-server:6784/delete-all";
3
+ msg.method = "POST";
4
+ msg.headers = { "Content-Type": "application/json" };
5
+ return msg;
@@ -0,0 +1,5 @@
1
+ // Function node for deleting a queue in qrusty
2
+ msg.url = "http://queue-server:6784/delete-queue/" + (msg.queue || "my_queue");
3
+ msg.method = "DELETE";
4
+ msg.headers = { "Content-Type": "application/json" };
5
+ return msg;
@@ -0,0 +1,5 @@
1
+ // Function node for checking qrusty server health
2
+ msg.url = "http://queue-server:6784/health";
3
+ msg.method = "GET";
4
+ msg.headers = { "Content-Type": "application/json" };
5
+ return msg;
@@ -0,0 +1,5 @@
1
+ // Function node for listing all queues in qrusty
2
+ msg.url = "http://queue-server:6784/queues";
3
+ msg.method = "GET";
4
+ msg.headers = { "Content-Type": "application/json" };
5
+ return msg;
@@ -0,0 +1,10 @@
1
+ // Function node for batch-negative-acknowledging messages in qrusty
2
+ msg.url =
3
+ "http://queue-server:6784/nack-batch/" + (msg.queue || "default_queue");
4
+ msg.method = "POST";
5
+ msg.payload = {
6
+ consumer_id: msg.consumer_id || "node-red-consumer",
7
+ message_ids: msg.messageIds || [],
8
+ };
9
+ msg.headers = { "Content-Type": "application/json" };
10
+ return msg;
package/qrusty-nack.js ADDED
@@ -0,0 +1,12 @@
1
+ // Function node for negative-acknowledging a message in qrusty
2
+ msg.url =
3
+ "http://queue-server:6784/nack/" +
4
+ (msg.queue || "default_queue") +
5
+ "/" +
6
+ msg.messageId;
7
+ msg.method = "POST";
8
+ msg.payload = {
9
+ consumer_id: msg.consumer_id || "node-red-consumer",
10
+ };
11
+ msg.headers = { "Content-Type": "application/json" };
12
+ return msg;
@@ -0,0 +1,5 @@
1
+ // Function node for purging all messages from all queues in qrusty
2
+ msg.url = "http://queue-server:6784/purge-all";
3
+ msg.method = "POST";
4
+ msg.headers = { "Content-Type": "application/json" };
5
+ return msg;
@@ -0,0 +1,5 @@
1
+ // Function node for purging all messages from a queue in qrusty
2
+ msg.url = "http://queue-server:6784/purge-queue/" + (msg.queue || "my_queue");
3
+ msg.method = "POST";
4
+ msg.headers = { "Content-Type": "application/json" };
5
+ return msg;
@@ -0,0 +1,6 @@
1
+ // Function node for getting time-series metrics for a queue in qrusty
2
+ msg.url =
3
+ "http://queue-server:6784/queues/" + (msg.queue || "my_queue") + "/metrics";
4
+ msg.method = "GET";
5
+ msg.headers = { "Content-Type": "application/json" };
6
+ return msg;
@@ -0,0 +1,5 @@
1
+ // Function node for getting stats for a specific queue in qrusty
2
+ msg.url = "http://queue-server:6784/queue-stats/" + (msg.queue || "my_queue");
3
+ msg.method = "GET";
4
+ msg.headers = { "Content-Type": "application/json" };
5
+ return msg;
@@ -0,0 +1,5 @@
1
+ // Function node for getting stats for all queues in qrusty
2
+ msg.url = "http://queue-server:6784/stats";
3
+ msg.method = "GET";
4
+ msg.headers = { "Content-Type": "application/json" };
5
+ return msg;
@@ -0,0 +1,13 @@
1
+ // Function node for updating a queue configuration in qrusty
2
+ msg.url = "http://queue-server:6784/update-queue";
3
+ msg.method = "POST";
4
+ var config = {};
5
+ if (msg.new_name !== undefined) config.name = msg.new_name;
6
+ if (msg.allow_duplicates !== undefined)
7
+ config.allow_duplicates = msg.allow_duplicates;
8
+ msg.payload = {
9
+ name: msg.queue || "my_queue",
10
+ config: config,
11
+ };
12
+ msg.headers = { "Content-Type": "application/json" };
13
+ return msg;