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
0 answers

ZeroMQ High and Low Volume Topics in PUB/SUB and Setting Topic-Specific Message Dropping Policies

Problem I am facing what I would assume is a common problem where I have a publisher which publishes on topics that are both high and low-volume (i.e. both topics where dropping is okay when subscriber/network is slow because they are high-frequency…
steve
  • 393
  • 1
  • 4
  • 14
1
vote
1 answer

Application freezes when no data is being received via ZMQ

I'm using the following code to receive the frame string. private SubscriberSocket subSocket; void Start() { subSocket = new SubscriberSocket(); subSocket.Connect("tcp://localhost:5555"); } void Update() { string data =…
Paul Andy
  • 89
  • 7
1
vote
0 answers

StdOut value meanings from ZMQ pub/sub from GnuRadio?

I am working with a remote source to get data from a 1MHz bandwidth. Once I have isolated a peak in the FFT plot like this, I am sending that peak data through a ZMQ Pub Sink to a separate computer, where I decode the bytes into a string using this…
1
vote
0 answers

How to send and get vector ZeroMQ pub/sub

I am using zeromq and trying to do a pub/sub socket. I found examples of how to transfer char* , but I need to know how to transfer a vector from the server, and how to receive it on the client. I already have a vector filled with data.…
Kate
  • 11
  • 1
1
vote
1 answer

How let client receive data everytime the server started?

I had created a zmq.SUB client to receive data from server when it can get data. client.py import zmq context = zmq.Context() socket = context.socket(zmq.SUB) socket.subscribe("") socket.connect("tcp://localhost:9000") while True: …
jett chen
  • 1,067
  • 16
  • 33
1
vote
2 answers

zmq Extended pub sub ({pub, pub, ...} -> {xsub->xpub} -> {sub, sub, ...}

I'm trying to implement something like the model described in Figure 14 - Extended Pub-Sub . I've looked at this snippet, which works fine. But when trying to implement the first part (i.e.: {pub, ...} -> {xsub I don't receive any data on the xsub…
blasrodri
  • 448
  • 5
  • 16
1
vote
0 answers

Interrupted system call in Req/rep in ZMQ

I'm using zmq on a computer (python) to communicate with a robot (c++) using zmq. The communication works most of the time but is then interrupted by an interrupted system call error after some time (no exact point in time). Python: to…
FR_MPI
  • 111
  • 1
  • 9
1
vote
1 answer

Using ZMQ within Cython

I've gotten ZMQ to work in .py files but I want to use it in a cython class but have not figure out how to import the right library in to .pyx files. Example: import zmq from zmq.backend.cython.socket cimport Socket from zmq.backend.cython.context…
user1234440
  • 22,521
  • 18
  • 61
  • 103
1
vote
1 answer

zero mq and python : not sending without sleep command

If I send a command without a sleep in the loop, zeromq will not send the data. However, if a really really short duration sleep in the loop, for example time.sleep(0.1), it sends the data fine. Why? This version of the code works…
resolver101
  • 2,155
  • 11
  • 41
  • 53
1
vote
1 answer

Trouble installing libzmq3-dev on GitHub Actions Ubuntu runners

I am having trouble installing libzmq3-dev on Ubuntu 16.04 on GitHub Actions. This may be a user error on my part because I do not run into an error when I install it on my local Ubuntu machine. I would appreciate troubleshooting advice, e.g.…
landau
  • 5,636
  • 1
  • 22
  • 50
1
vote
2 answers

How to check for specific ZMQ CPP monitor event

I have a current implementation of ZMQ in my program that works great. I am initializing my monitor with ZMQ_EVENT_CONNECTED then checking for the event with the ZMQ provided bool check_event(10) - 10 is the timeout length. I want to change my…
Chip Brommer
  • 103
  • 9
1
vote
3 answers

Cannot access Zeromq from docker runned locally

I am trying to access my zeromq run in docker. In my code, I use: const socket = new ZeroMQ.Pull() socket.connect(`tcp://${process.env.IP}:${process.env.PORT}`) // other logic here where my IP and PORT are set as 0.0.0.0 & 4000 here's my…
Rashid
  • 1,700
  • 1
  • 23
  • 56
1
vote
1 answer

python & zeroMQ -- Capacity to Handle Messages of Large Size?

I'd like to use python to build an app that is similar to zeroMQ's ventilator / sink scheme Suppose that we have 10 Workers, all running on the same multi-core server. Let's say that every 2[sec] or so, each Worker pushes to the Sink a message of…
user3262424
  • 7,223
  • 16
  • 54
  • 84
1
vote
1 answer

bitbake can't build cppzmq when it's included in an image

I'm building a yocto project which uses cppzmq (http://layers.openembedded.org/layerindex/recipe/123508/) The strange thing is that when I build it directly bitbake cppzmq it builds successfully. But when I include it in my…
user10838321
1
vote
0 answers

REST-like pattern in zeromq

How does one create a REST-like pattern with zeromq? Specifically, I have the following architecture: A user sends a POST request to Server A, which then sends that request to Server B to do some more processing. After that, Server B sends that…