@5minds/node-red-contrib-processcube-amqp 0.1.0 → 0.3.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.
@@ -429,7 +429,7 @@
429
429
  },
430
430
  "@5minds/node-red-contrib-processcube-amqp": {
431
431
  "name": "@5minds/node-red-contrib-processcube-amqp",
432
- "version": "0.1.0",
432
+ "version": "0.2.0",
433
433
  "local": true,
434
434
  "user": false,
435
435
  "nodes": {
@@ -444,6 +444,17 @@
444
444
  "module": "@5minds/node-red-contrib-processcube-amqp",
445
445
  "file": "/data/node_modules/node-red-contrib-processcube-amqp/amqp-input.js"
446
446
  },
447
+ "amqpOutput": {
448
+ "name": "amqpOutput",
449
+ "types": [
450
+ "amqp-output"
451
+ ],
452
+ "enabled": true,
453
+ "local": true,
454
+ "user": false,
455
+ "module": "@5minds/node-red-contrib-processcube-amqp",
456
+ "file": "/data/node_modules/node-red-contrib-processcube-amqp/amqp-output.js"
457
+ },
447
458
  "amqpConfig": {
448
459
  "name": "amqpConfig",
449
460
  "types": [
@@ -43,7 +43,7 @@
43
43
  "statusVal": "",
44
44
  "statusType": "auto",
45
45
  "x": 620,
46
- "y": 260,
46
+ "y": 280,
47
47
  "wires": []
48
48
  },
49
49
  {
@@ -52,7 +52,7 @@
52
52
  "z": "ea5e703747705005",
53
53
  "name": "",
54
54
  "amqpServer": "cbcfcb0a896f9765",
55
- "exchange": "Test2",
55
+ "exchange": "Test2__",
56
56
  "exchangeType": "topic",
57
57
  "routingKey": "test.*",
58
58
  "queue": "Test2",
package/README.md CHANGED
@@ -1 +1,64 @@
1
- # node-red-contrib-processcube-amqp
1
+ # Node-RED with RabbitMQ Integration
2
+
3
+ This repository contains a Docker Compose setup that integrates
4
+ RabbitMQ with AMQP into Node-RED. The integration with a message
5
+ bus like RabbitMQ provides the ability to interact with the ProcessCube
6
+ platform (processcube.io) in a decoupled manner. While we use RabbitMQ
7
+ as an example here, the setup can be adapted to work with any message
8
+ bus that supports the AMQP protocol.
9
+
10
+ ## Prerequisites
11
+
12
+ - Docker
13
+ - Docker Compose
14
+ - Node.js
15
+ - npm
16
+
17
+ ## Setup
18
+
19
+ To set up and run the services, follow these steps:
20
+
21
+ 1. Install the necessary dependencies with npm:
22
+
23
+ ```bash
24
+ npm install
25
+ ```
26
+
27
+ 1. Build the Docker images:
28
+
29
+ ```bash
30
+ docker compose build
31
+ ```
32
+
33
+ Start the services:
34
+ ```bash
35
+ docker compose up
36
+ ```
37
+
38
+ After the services (RabbitMQ and Node-RED) are running, you can access RabbitMQ
39
+ via the management portal on `localhost` port `5672`. Use `guest` for both the
40
+ username and password to log in.
41
+
42
+ ## Node-RED
43
+
44
+ Node-RED is a programming tool for wiring together hardware devices, APIs and online
45
+ services in new and interesting ways. In this setup, Node-RED is configured to use
46
+ a custom node for RabbitMQ integration via AMQP.
47
+
48
+ You need to use the amqp-config node with a correct AMQP URL that can access a
49
+ running RabbitMQ instance. See the rabbitmq service in the Docker Compose file
50
+ for more details.
51
+
52
+ You can add an amqp-in node and subscribe to a sample exchange to receive messages
53
+ and process them with a flow in Node-RED. Alternatively, you can publish an exchange
54
+ with a routing key to send messages to other decoupled systems after processing in
55
+ a Node-RED flow.
56
+
57
+ ### RabbitMQ
58
+ RabbitMQ is an open-source message-broker software that originally implemented the
59
+ Advanced Message Queuing Protocol (AMQP) and has since been extended with a plug-in
60
+ architecture to support Streaming Text Oriented Messaging Protocol (STOMP),
61
+ Message Queuing Telemetry Transport (MQTT), and other protocols.
62
+
63
+ In this setup, RabbitMQ is available for management at port `15672` and for
64
+ AMQP connections at port `5672`.
package/amqp-input.html CHANGED
@@ -1,6 +1,6 @@
1
1
  <script type="text/javascript">
2
2
  RED.nodes.registerType('amqp-input',{
3
- category: 'ProcessCube',
3
+ category: 'ProcessCube (MQ)',
4
4
  color: '#00aed7',
5
5
  defaults: {
6
6
  name: {value: "", type: "string"},
package/amqp-output.html CHANGED
@@ -1,6 +1,6 @@
1
1
  <script type="text/javascript">
2
2
  RED.nodes.registerType('amqp-output',{
3
- category: 'ProcessCube',
3
+ category: 'ProcessCube (MQ)',
4
4
  color: '#00aed7',
5
5
  defaults: {
6
6
  name: {value: "", type: "string"},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-contrib-processcube-amqp",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED nodes for AMQP",
6
6
  "authors": [