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

How to zmq.poll() some socket and some sort of variable?

I'm attempting to poll a few sockets and a multiprocessing.Event The documentation states: A zmq.Socket or any Python object having a fileno() method that returns a valid file descriptor. which means that I can't use my Event but I should be…
Nullman
  • 4,179
  • 2
  • 14
  • 30
1
vote
1 answer

ZeroMQ Radio/Dish does not receive messages

I am trying to get the Radio/Dish pattern in ZeroMQ (libzmq with plain C) to work. Ultimately I want to use UDP multicasting but I cannot even get TCP unicast to work. The following minimal example does not work for me. I tried the Pub/Sub example…
user3563584
  • 403
  • 1
  • 4
  • 6
1
vote
2 answers

UDP-protocol doesn't work in ZeroMQ. Which socket type should be used?

I tried to connect my PUB-client ( uses pyzmq version 19.0.0 ) with server via udp://: context = zmq.Context() socket = context.socket( zmq.PUB ) socket.connect( "udp://127.0.0.1:34567" ) but the code throws always an error: zmq.error.ZMQError: The…
user2973395
  • 37
  • 1
  • 5
1
vote
1 answer

ZeroMQ - Can we check subscribers before sending a message?

The classic ZeroMQ PUB pattern, is something like : format your complete message send your message ( managed by ZMQ ) if there is a subscriber to the topic, then send it, else trash it ? What I've noticed in one of my applications, is that the…
1
vote
0 answers

ZeroMQ REQ-ROUTER messages not being received

I have 10 clients receiving queries from a server, processing the queries and send messages to a server roughly at the same time The receive side is as such: I first create the socket: val commandSocket =…
Hossein
  • 1,152
  • 1
  • 16
  • 32
1
vote
1 answer

Why a ZeroMQ demo code doesn't work on Win10?

I'm learning how to communicate with a server from a client/trader perspective. It looks like ZeroMQ is the go-to package dealing with this. I found this piece of demo code on the website. The thing is it doesn't produce the desired output as in…
Chen Lizi
  • 103
  • 9
1
vote
2 answers

How to discover the high-performance network interface on a linux HPC cluster?

I have a distributed program which communicates with ZeroMQ that runs on HPC clusters. ZeroMQ uses TCP sockets, so by default on HPC clusters the communications will use the admin network, so I have introduced an environment variable read by my code…
Anthony Scemama
  • 1,563
  • 12
  • 19
1
vote
1 answer

0MQ: Can you drop a message after a timeout in a REQ/REP pattern?

In my 0MQ applications I usually do this to deal with a timeout: import zmq ctx = zmq.Context() s = ctx.socket(zmq.DEALER) s.connect("tcp://localhost:5555") # send PING request v = s.send_multipart(["PING", v]) if…
Pablo
  • 13,271
  • 4
  • 39
  • 59
1
vote
0 answers

Shall I use a ZeroMQ Socket's file-descriptor for reading it from other (boost::asio) framework?

If I get a socket descriptor, can I read data through a different socket object if I have assigned the file descriptor to it? void *zmq_ctx = zmq_ctx_new (); void *zmq_sock_ = zmq_socket (zmq_ctx, ZMQ_REQ); int zfd; size_t optlen =…
Deven
  • 13
  • 5
1
vote
1 answer

In ZMQ PUSH/PULL How to know socket status(connected or not) in python?

I'm a beginner and I've tried using with ZMQ monitor queue but I'm not getting expected result
vinod
  • 535
  • 5
  • 10
1
vote
1 answer

how to close the Client Connection and return the Call in NETMQ?

I am just Started Using NETMQ REQ/RES pattern to send and receive the request response from both ends. Client is from IIS and server is from windows service. My question is when i had stopped the service and tried a client request. The client went…
vela
  • 147
  • 10
1
vote
1 answer

Latency after moving micro-service (using ZeroMQ, C, & Python processes) from 64 bit hardware to 32 bit hardware, but nominal cpu usage

I have two processes wrote in C that set up PUSH/PULL ZeroMQ sockets and two threads in a Python process that mirror the PUSH/PULL sockets. There are roughly 80 - 300 light weight (<30 bytes) messages per second being sent from the C process to the…
Redherring
  • 93
  • 1
  • 8
1
vote
1 answer

Why will ZeroMQ PUSH/PULL work, but not PUB/SUB?

Environment: NVIDIA-flavored Ubuntu 18.01 on their Jetson development board with their TX2i processor. ZMQ 4.3.2, utilizing the cppzmq C++ wrapper for ZMQ. I've got a slew of code running using google protocol buffers with ZeroMQ, and it's all…
PfunnyGuy
  • 750
  • 9
  • 22
1
vote
1 answer

Receiving zmq messages in aligned memory buffer for capnp FlatArrayMessageReader

I am sending a message over ZeroMQ PUB/SUB archetype, using a tcp:// transport-class channel, after serializing a capnp message using capnp::messageToFlatArray. On the receiving side I receive the entire content in a zmq_msg_t message. But…
1
vote
1 answer

Deploying Vue App Locally and Out of Sandbox

Is there any way to deploy a VueJS app locally without having it limited by the browser? I want the user to be able to call the application from the command line, for example app_name --port 6000, and then be able to load up the app from…
1 2 3
99
100