Questions tagged [zeromq]

ZeroMQ (ZMQ, 0MQ, ØMQ) is a high-performance, asynchronous, transport-class agnostic, messaging library, aimed at use in scalable, distributed and/or concurrent applications. It provides a message queue, but unlike message-oriented middleware, a ZeroMQ system can run without a dedicated message broker. License: LGPL with static linking exception

ZeroMQ (Zero Message Queue) is a high-performance, asynchronous, transport-class agnostic messaging library, aimed to use in scalable distributed or concurrent applications. It provides a set of paradigms, similar to a message queue, but unlike message-oriented middleware, a ZeroMQ system operates without any dedicated, central / singular message-handling broker. Instead of that, several Scalable Formal Communication Patterns are provided as a particular communication archetype, serving as prototypes to create smart, more complex messaging / signalling planes, used for inter-connecting a distributed system.

The library is designed to have a familiar socket-style API and supports many transport-classes, incl. { inproc:// | ipc:// | tipc:// | vmci:// | tcp:// | pgm:// | epgm:// | udp:// }.

A more recent extension allows to use also the norm:// reliable multicast and unicast protocol, so far at least for (X)PUB/(X)SUB Scalable Formal Communications Pattern Archetypes.

ZeroMQ is developed by iMatix Corporation together with a large community of contributors. There are third-party bindings for almost every popular programming languages, from , ,,,, to , and many more.

ZeroMQ (also spelled ØMQ, 0MQ or ZMQ)


The basic ZeroMQ patterns join many-to-many topologies of distributed-agents, where specific message-handling behaviours ( aka Scalable Formal Communication Pattern Archetypes ) take place:

REQ / REP : the Request–Reply archetype

Connects a set of clients to a set of services. This is a remote procedure call and task distribution pattern.

PUB / SUB : the Publish–Subscribe archetype

Connects a set of publishers to a set of subscribers. This is a data distribution pattern.

PUSH / PULL : the Push–Pull (pipeline) archetype

Connects nodes in a fan-out / fan-in pattern that can have multiple steps, and loops. This is a parallel task distribution and collection pattern.

PAIR / PAIR Exclusive pair

Connects two sockets in an exclusive pair. (This is an advanced low-level pattern for specific use cases.)

ROUTER / DEALER formerly also known as XREQ / XREP archetype

XPUB / XSUB archetype extends the classical PUB/SUB archetype with adding also the application-level access to the subscription-management events.


Useful links:

You can get more information in the following sites:

3306 questions
1
vote
1 answer

External input in dash plotly

In my specific case I am looking to have zeromq (https://zeromq.org) messages trigger a callback in dash (and the dash callback be able to trigger sending messages similarly). Generically this is having dash triggered by external input; is there…
Helios
  • 675
  • 4
  • 13
1
vote
1 answer

Bi-directional messaging using Zero MQ pub sub pattern

I am trying to design a system that can be safely used to share messages between processes on the same system using ZeroMQ. I have chosen to use a central broker that binds to a particular port. All clients would bind to the same port and publish…
1
vote
0 answers

Redirect ZeroMQ PUB socket to STDIO to a local TCP socket using C#

This is probably going to sound very stupid so please bear with me. My goal is to be able to use the Docker API attach functionality like a TCP socket, so I can use it to achieve something like an SSH or kubectl port forwarding. I have a library…
tacos_tacos_tacos
  • 10,277
  • 11
  • 73
  • 126
1
vote
1 answer

How to get a value from Custom Indicator with zmq?

I have an MQL4 Custom Indicators and I make the EA ( an Expert Advisor ) to get data into MetaTrader Terminal 4 ( mt4 ). But, how can I import my custom indicators EA to client zmq to get the value ?
Agam Theos
  • 17
  • 6
1
vote
1 answer

ZMQ_DEALER with ZMQ_REP

I'm sorry for this kinda stupid question, but I didn't find any other answer. How can I send a message from ZMQ_DEALER to ZMQ_REP? There is server code: std::string ans; zmq::context_t context; zmq::socket_t socket(context, ZMQ_DEALER); int port…
1
vote
1 answer

How to Perform Concurrent Request-Reply for Asynchronous Tasks with ZeroMQ?

Intention I want to allow a client to send a task to some server at a fixed address. The server may take that task and perform it at some arbitrary point in the future, but may still take requests from other clients before then. After performing the…
jcai849
  • 13
  • 3
1
vote
2 answers

Getting errors on npm install zeromq

I'm trying to install ZeroMQ v5 through npm install zeromq@5 on a MacOS 11.5.2, but I'm getting the errors from below: Other specs: Node v16.2.0 - Python 2.7.16 - node-gyp v3.8.0 npm ERR! code 1 npm ERR! command failed npm ERR! command sh -c…
dNyrM
  • 545
  • 1
  • 4
  • 17
1
vote
1 answer

ZeroMQ while True does not work forever in python, why?

I have this script in Ubuntu 20.04 server, who saves some data I send to it regularly through my laptop, but the script does not run forever as it was supposed to do, even after using a while True loop because when i try to connect to server as…
urek mazino
  • 130
  • 12
1
vote
1 answer

ZeroMQ: Python Server to C++ Client

Currently working on a Python to ZMQ Program; this is what I have for the c++ client so far: zmq::context_t context{1}; zmq::socket_t socket{context, zmq::socket_type::req}; socket.connect("tcp://IPADDRESSPLACEHOLDERTEXT:51000"); …
MrFreeze2017
  • 79
  • 1
  • 7
1
vote
1 answer

How to send a one-way heartbeat message in ZMQ?

Trying to send a one-way heartbeat message in ZMQ. Could anyone point me in the right direction? I am using libzmq and cppzmq.
MrFreeze2017
  • 79
  • 1
  • 7
1
vote
1 answer

(Windows) Adding ZeroMQ to ZeroBrane?

Bear with me, as I'm not a pro by any means. I've known about ZeroMQ for a while, and that it offers a very interesting way of utilizing multiple cores by clever use of networking. I'd like to see what I can get going with it, as the lua examples…
FiftyTifty
  • 91
  • 1
  • 7
1
vote
1 answer

Delay when using Task.Run()

I am reading data via ZMQ and executing tasks in a separate thread based on their topic. I noticed that when the data frequency is really high (~1 message every 1ms), some of the tasks take a really long time to execute. This is basically what I'm…
bjalexmdd
  • 186
  • 1
  • 11
1
vote
0 answers

Why is ZeroMQ multipart sending/receiving wrong messages?

In python I'm creating an application also using ZeroMQ. I'm using the PUSH/PULL method to send the loading status of one script to another. The message received on the PULL script runs inside of a Thread. The PULL script looks like this: import…
Gordian
  • 101
  • 8
1
vote
0 answers

REQ socket drop message silently if two message coming together very fast

This is a reproducible message silently dropped issue with a very small changes to the lbbroker.cpp. https://github.com/booksbyus/zguide/blob/master/examples/C%2B%2B/lbbroker.cpp In the lbbroker.cpp file, a worker will be pop out from work_queue…
lewis
  • 11
  • 3
1
vote
0 answers

zeromq php extension/binding on 64bit windows 2008 Server R2

As the question heading speaks for its self. Any one having luck running zeromq as a php extension on Windows Server 2008 R2 64bit. Regardless on Apache or IIS. Thanks.
NativeCoder
  • 1,033
  • 1
  • 10
  • 16