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

ZMQ_HEARTBEAT_TTL does not discard outgoing queue even if ZMQ_LINGER is set

I have a server which uses a ZMQ_ROUTER to communicate with ZMQ_DEALER clients. I set the ZMQ_HEARTBEAT_IVL and ZMQ_HEARTBEAT_TTL options on the client socket to make the client and server ping pong each other. Beside, because of the…
AnhHao Trần
  • 145
  • 1
  • 10
1
vote
1 answer

APT says 'package has no installation candidate' althought it shows it in apt list

I am trying to install ZeroMQ extension for PHP using Docker image php:7.4-apache-buster. The package is found when running apt list: $ sudo apt update && apt list php-zmq outputs php-zmq/stable 1.1.3-9 amd64 It is not possible to install it…
user14967413
  • 1,264
  • 1
  • 6
  • 12
1
vote
1 answer

How to make ZeroMQ use UDP?

I can't seem to be able to use UDP or find any examples of how to use it in PyZMQ. I want to be able to send a h264 stream. I was able to do that using TCP by using @nathancy answer on Python Opencv and Sockets - Streaming video encoded in h264. But…
AxelG
  • 37
  • 1
  • 4
1
vote
3 answers

NetMQ gets stuck when I try to dispose the Poller (Request-Reply pattern)

This is my first project using the NetMQ (ZMQ) framework, so, maybe I didn't understand how to use it exactly. I create a Windows Forms project with two applications, one send a "ping" to the other and receives a "pong" as an answer. The protocol is…
1
vote
1 answer

ZeroMQ assertion failed: socket handle no longer valid for some reason

Got a Windows 10 c++ program using ZeroMQ that aborts very often on the same group of computers due to assertion failures. The assert statement is buried deep into the libzmq code. On other machines, the same program runs fine without those…
E. van Putten
  • 615
  • 7
  • 17
1
vote
0 answers

ZeroMQ Connector How to check if an order has been closed by SL/TP?

There is little information about ZeroMQ Connector, I was following the 7 video tutorials on how to interface python with a MetaTrader Terminal 4 and got no problem running them on iPython kernel just as instructed in this video I have an issue is…
Michael
  • 529
  • 1
  • 8
  • 22
1
vote
0 answers

Python: streaming audio and video using zeromq

I was wondering how can I stream audio and video using zmq? I know how to stream video using it but how can I add the audio part?
eitan102
  • 53
  • 6
1
vote
1 answer

2-way interop/IPC between SWI Prolog & Python

There is module to call from Python (pyswip) =to=> Prolog, but is there a way to call the other way around from Prolog =to=> Python ? I need it so I can call Spacy-NLP module from SWI-Prolog couldn't find if SWI supports ZeroMQ.
sten
  • 7,028
  • 9
  • 41
  • 63
1
vote
0 answers

ZeroMQ.js: With zmq.Pair, if socket.send() is called outside of an async loop, then the messages will not not received by the receiver

My setup macOS 10.15.7 zeromq.js: v6.0.0-beta.6 node.js: v14.4.0 I'm using ZeroMQ.js to communicate between my app's frontend and backend. The pattern in use is zmq.Pair. And the client, a.k.a. the frontend, can receive messages from the server,…
kakyo
  • 10,460
  • 14
  • 76
  • 140
1
vote
1 answer

Is ZeroMQ XPUB recv() a solution for finding if there is a subscriber and solve the slow joiner syndrome?

My use case: The Subscriber will be a server(bind to a port) and it will wait messages from multiple publishers. The Publishers will be initialized inside different threads as clients(connect to the port). The data to publish in each thread will be…
Otobo
  • 714
  • 1
  • 7
  • 13
1
vote
3 answers

Distributing Real-Time Market Data Using ZeroMQ / NFS?

Suppose that you have a machine that gets fed with real-time stock prices from the exchange. These prices need to be transferred to 50 other machines in your network in the fastest possible way, so that each of them can run its own processing on the…
user3262424
  • 7,223
  • 16
  • 54
  • 84
1
vote
1 answer

Multiple publishers for live market data streaming using ZMQ Black Box Pattern

I'm trying to implement a live trading tick data streaming from a MT4 terminal to a Postgres database. To accomplish this, I'm using dwx-zeromq-connector and I had success when doing this for 2 currency pairs. The way the connector works is by…
1
vote
0 answers

ZeroMQ PUB/SUB between a pair of Android devices works with .connect() only, .bind() so far seems to fail

I am currently trying to set up pub/sub messaging between two Android devices (within Unity specifically) but have found that for some reason, only the connect()-method works on Android devices while "binding" does not. Thus, having one Android…
1
vote
2 answers

ZeroMQ: How to construct simple asynchronous broker? Seems impossible

I am building a simple star-like client-server topology. The idea is that clients connect to the server, can send messages, and the server can send messages to them, when the server decides to. There will be a relatively small number of clients,…
Elmore
  • 256
  • 3
  • 7
1
vote
3 answers

How to set up a ZeroMQ request-reply between a c# and python application

I'm trying to communicate between a c#(5.0) and a python (3.9) application via ZeroMQ. For .Net I'm using NetMQ and for python PyZMQ. I have no trouble letting two applications communicate, as long as they are in the same language c# app to c#…
Geertie
  • 237
  • 4
  • 15