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
11
votes
8 answers

How do I compile jzmq for ZeroMQ on OSX?

Trying to follow the directions from: http://github.com/zeromq/jzmq I installed pkg-config using Homebrew and then I run the following commands: ./autogen.sh ./configure The configure fails with: checking how to hardcode library paths into…
Joshua
  • 26,234
  • 22
  • 77
  • 106
11
votes
3 answers

Difference between ZeroMQ and IPC

Q1: What exactly is the difference between using ZeroMQ to send messages to child processes, as compared to the default inter process communication explained here? Q2: For direct process to child communication, which would be more appropriate?…
NiCk Newman
  • 1,716
  • 7
  • 23
  • 48
11
votes
1 answer

Understanding advanced ZeroMQ socket types

I've read the 0MQ guide, and I understand the basic socket types: PUSH/PULL, REQ/REP, and PUB/SUB. I'm very confused though about ROUTER/DEALER and the X- sockets (e.g., XSUB/XPUB, XREQ/XREP). What are the use cases for these socket types?
Thomas Johnson
  • 10,776
  • 18
  • 60
  • 98
11
votes
3 answers

How to synchronize data amongst devices in Wi-Fi

I am developing an app for iOS and Android. The basic functionality is to keep a certain set of data synchronized across all devices in a Wi-Fi network without a central server. Every device can modify that set of data. The current approach is to…
Lukas Leitinger
  • 631
  • 4
  • 15
11
votes
2 answers

How to use ZeroMQ for raw UDP?

I have a client, whose code I can't change -- but I'd like to (re)write using ZeroMQ sockets. The clients use both raw TCP and raw UDP sockets. I know I can use ZMQ_ROUTER_RAW for raw TCP sockets, but what about for raw UDP datastreams?
FreeMemory
  • 8,444
  • 7
  • 37
  • 49
11
votes
2 answers

Installing the Java ZeroMQ binding (jzmq) using Maven, Missing Native Code Library

I am attempting to install jzmq, the Java ZeroMQ binding, from the Maven repository (http://search.maven.org/#search|ga|1|a%3A%22jzmq%22). When added as a dependency to my pom.xml[1] Maven downloads the main jar, which provides a Java library, as…
Jaunty
  • 111
  • 1
  • 5
11
votes
2 answers

How do I do multiple publishers with a single endpoint in ZeroMQ?

I'm attempting to do a pub/sub architecture where multiple publishers and multiple subscribers exist on the same bus. According to what I've read on the internet, only one socket should ever call bind(), and all others (whether pub or sub) should…
stix
  • 1,140
  • 13
  • 36
11
votes
2 answers

How to get public IP of requester in REQ-REP pattern of ZeroMQ?

Sounds like it makes no sense in ZeroMQ to work with sockets in terms of traditional UNIX sockets. I designed an architecture for a distributed search algorithm based on a wrong perception of ZeroMQ. In my program, there is an agent responsible of…
sorush-r
  • 10,490
  • 17
  • 89
  • 173
11
votes
1 answer

what is the expected performance of ZeroMQ?

I am dabbling with process-to-process communication; the aim is to have worker processes that perform some computations and pass back the result to a controlling process. I installed zeromq.node and set up a simple requester and responder in…
flow
  • 3,624
  • 36
  • 48
11
votes
3 answers

ZMQ::LibZMQ3 and strawberry perl

I am trying to install ZMQ::LibZMQ3 on strawberry perl but get the below error message while installing this module also my zmq libs and includes are found under C:\Program Files\ZeroMQ 3.2.2 : cpan> install ZMQ::LibZMQ3 Running install for module…
smith
  • 3,232
  • 26
  • 55
11
votes
3 answers

Job processing via web application: real-time status updates and backend messaging

I would like to implement an (open source) web application, where the user sends some kind of request via his browser to a Python web application. The request data is used to define and submit some kind of heavy computing job. Computing jobs are…
Dr. Jan-Philip Gehrcke
  • 33,287
  • 14
  • 85
  • 130
11
votes
2 answers

ZMQ REP, knowing who send the request

I m currently using zmq with python. Server is using REP socket. Do I have a way, when recv a message, to know who send it ? If a receive 2 messages, I just need to know if they come from the same user or not, so an uid for example would be enough.…
Djoby
  • 602
  • 1
  • 6
  • 22
11
votes
3 answers

How to run ZeroMQ with Java?

I'm having an issue running ZeroMQ with Java using Eclipse and Windows XP. I've successfully installed [I think] the 0MQ libraries as well as the Java bindings. The instructions I used to do that are located here. Two files were built: zmq.jar and…
Noah
  • 542
  • 1
  • 5
  • 16
11
votes
1 answer

zeromq and bind_to_random_port - how to get port chosen

In python, I am using the following: context = zmq.Context() socket = context.socket(zmq.PUSH) socket.bind_to_random_port('tcp://*', min_port=6001, max_port=6004, max_tries=100) port_selected = socket.??????? How do I know what port…
Tampa
  • 75,446
  • 119
  • 278
  • 425
11
votes
3 answers

What are the alternatives to ZeroMQ for moving protocol buffer payloads around?

At the moment I have a solution that uses ZeroMQ to exchange protocol buffer payloads. The protocol buffer method of serialization is bound to stay as it is, but I can replace ZMQ with a more convenient option. The things I am not happy about in…
mahonya
  • 9,247
  • 7
  • 39
  • 68