Git Product home page Git Product logo

node-red-contrib-zeromq's Introduction

node-red-contrib-zeromq

Node-RED nodes that provides publish subscribe, push pull, request reply and pair nodes for ZeroMQ.

The peer-to-peer publish subscribe capability, while not unlike MQTT, but without a broker, and without many of the same semantics. It works nicely using localhost to provide local process separation.

Relies on the zeromq npm package to provide pre-build binaries to make installing easier... but can take some time to compile if not available.

Install

Run the following command in your Node-RED user directory - typically ~/.node-red

npm install node-red-contrib-zeromq

Input

The host should be specified as a ZeroMQ connection string. This is typically of the form tcp://ip.address.of.server:port

When subscribing a topic of interest can be specified by a string. The topic matching is purely on first matching characters - i.e. the topic starts with...

Note: this is NOT the same as MQTT - please read up on how ZeroMQ handles topics before raising an issue.

ZeroMQ messages can have multiple parts or fields - typically two - by default topic and payload, but you can name more if required depending upon the application you are trying to integrate, by using the comma separated field property.

Output

The host should be specified as a ZeroMQ connection string. This is typically of the form tcp://*:port

By default this node expects to publish or push two fields - msg.topic and msg.payload. However ZeroMQ can support multipart messages and the msg properties to send can be specified by the comma separated fields configuration.

The topic to send can be fixed in the configuration if required.

Request

A node to handle ZeroMQ pair, request and response messaging modes.

The host should be specified as a ZeroMQ connection string. This is typically of the form 'tcp://ip.address.of.host:port'

ZeroMQ can support multipart messages and extra 'msg' properties to send can be specified by the comma separated fields configuration.

node-red-contrib-zeromq's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

node-red-contrib-zeromq's Issues

Error with msg.payload as JSON

Since version 0.0.8 if specifying zeromq node output as "a JSON object if possible" the error "failed to parse" is issued if msg.payload really is a JSON object.
I think the test(s):
if (node.output !== "buffer") { --> e.g at line 46
have to be changed to:
if (node.output !== "buffer" && node.output !== "json") {
otherwise JSON output is handled twice as string and as json (but I am not so experienced with javascript, so please discard this comment if I am wrong)

Error: Cannot find module 'rimraf'

Hello, i have an issue with installing node-red-contrib-zeromq . I tried to install it from palette and i show me that :
"

[email protected] install /usr/lib/node_modules/node-red/node_modules/node-red-contrib-zeromq/node_modules/zeromq
node-gyp-build || npm run build:libzmq

gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: Cannot find module 'rimraf'
gyp ERR! stack at Function.Module._resolveFilename (module.js:489:15)
gyp ERR! stack at Function.Module._load (module.js:439:25)
gyp ERR! stack at Module.require (module.js:517:17)
gyp ERR! stack at require (internal/module.js:11:18)
gyp ERR! stack at Object. (/usr/lib/node_modules/node-red/node_modules/node-gyp/lib/clean.js:10:10)
gyp ERR! stack at Module._compile (module.js:573:30)
gyp ERR! stack at Object.Module._extensions..js (module.js:584:10)
gyp ERR! stack at Module.load (module.js:507:32)
gyp ERR! stack at tryModuleLoad (module.js:470:12)
gyp ERR! stack at Function.Module._load (module.js:462:3)
gyp ERR! System Linux 4.14.9-klk
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-red/node_m... "

thnx for answering :)

Installing latest node-red-contrib-zeromq crashes node-red Docker Container

Installation of the latest version of this node on the latest version of the node-red/node-red Docker image crashes the container.

Steps to reproduce:

  1. docker run -it -p 1880:1880 --name mynodered nodered/node-red
  2. Open the Dashboard by navigating to http://localhost:1880
  3. Menu -> Manage palette -> Install
  4. Search for node-red-contrib-zeromq and click install

The node seems to install, but then if you wait about 10 - 30 seconds you'll see the "Lost connection to server" message and the container exits.

NodeRed Dumping after installation

Hi, after installin gthis node to my dockered NodeRed it was crashing and not able to start again:

2023-11-30T15:09:10.852902554Z Welcome to Node-RED
2023-11-30T15:09:10.852906462Z ===================
2023-11-30T15:09:10.852909968Z
2023-11-30T15:09:10.853793660Z 30 Nov 16:09:10 - [info] Node-RED version: v3.0.2
2023-11-30T15:09:10.854090694Z 30 Nov 16:09:10 - [info] Node.js version: v16.16.0
2023-11-30T15:09:10.854210401Z 30 Nov 16:09:10 - [info] Linux 5.15.39-4-pve x64 LE
2023-11-30T15:09:11.298004494Z 30 Nov 16:09:11 - [info] Loading palette nodes
2023-11-30T15:09:13.025626938Z ./entrypoint.sh: line 14: 8 Segmentation fault (core dumped) /usr/local/bin/node $NODEOPTIONS node_modules/node-red/red.js --userDir /data $FLOWS

Would you have any hint please?

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Architecture

Good day!

I want to create PR with some improvments. Before, I'll do it, I am glad to see your opinion/vision for this architecture questions:

  • There are many types of sockets: PULL/PUSH, PUB/SUB and e.t.c. Have you any preference about how to choose type? (my vision - combo box)
  • Maybe enough send only matched fields (mean with known fields names) in payload with special field for unknown arguments. Current implementation (modify node property as part + i ) looks danger/unexpectly... I'm not sure. May be you have some reasons for that?
  • As you know, connect or bind in ZMQ sockets can be applied for server AND client. May be just add some checkbox for this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.