node-red-contrib-ws-subscriber-custom
Custom Websocket for connecting to ESB with help of Header with Token and X-ClientId.
Installation
npm install node-red-contrib-ws-subscriber-custom
Or in NodeRED Manage palette and serarch for node-red-contrib-ws-subscriber-custom
Publish or update npm packages
First:
npm publish --access=public
After publishing npm package, you have to add the public package to the nodered palette. Go to https://flows.nodered.org/add/node and add your packagename. After a while you can find it in Nodered palette.
Usage
custom-websocket-subsriber Node
Every subscriber node needs
- Websocket-Serveradress
- XClientId
- Token
If everything is correct the node shows a green dot after deploy. If the dot is red, something went wrong while connecting to the WSS.
Incoming messages gets append to the output message object with the name "payload".
custom-websocket-acknowledge
-
the acknowledge Node sends messages back to the WSS configured in "custom-websocket-subsriber".
-
This message is sended back to WSS to acknowledge:['{Type of Message}', '{Topic}', {'Message Number'}], defined in Node template.
-
Example:
-
Message send to WSS by custom-websocket-acknowledge:
-
['message-ack', 'PRODUCT.7', '2960249']