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
14
votes
2 answers

DDS vs AMQP vs ZeroMQ

I wanted a feedback on whether my evaluations and concerns are correct. I have been reseaching the three, Data Distribution Service, AMQP and ZeroMQ for sometime now for building a data transport layer in a datacenter. All the three look promising,…
Kisalay
  • 607
  • 1
  • 6
  • 11
14
votes
2 answers

Get subscriber filter from a ZMQ PUB socket

I noticed in the FAQ, in the Monitoring section, that it's not possible to get a list of connected peers or to be notified when peers connect/disconnect. Does this imply that it's also not possible to know which topics a PUB/XPUB socket knows it…
dfarrell07
  • 2,872
  • 2
  • 21
  • 26
14
votes
1 answer

ZeroMQ, Client<-> Server , bi-directional communication possible with only having the client connect to host?

I am facing the following problem: I have a client (ultimately n-clients) and like to connect to a server. Clients know the server/host address but the server does not know the address of the client(s). I like to be able to accomplish the following…
Matt
  • 7,004
  • 11
  • 71
  • 117
14
votes
5 answers

How to install the C++ binding for ZeroMQ on Mac OS X?

On g++ actualApp.cpp -lzmq I get actualApp.cpp:6:19: error: zmq.hpp: No such file or directory actualApp.cpp: In function ‘int main()’: actualApp.cpp:13: error: ‘zmq’ has not been declared actualApp.cpp:13: error: expected `;' before…
user494461
14
votes
1 answer

Compile simple hello world ZeroMQ C example, compile flags?

Trying to compile the example hello_world.c from the zeromq tutorial: http://zguide.zeromq.org/page:all#Ask-and-Ye-Shall-Receive Pretty sure I have everything installed in OSX Mountain Lion. clang -Wall hwserver.c -o hwserver gives me an…
Nick Desaulniers
  • 2,046
  • 3
  • 25
  • 47
13
votes
3 answers

ZeroMQ in javascript client

Have anyone used ZmqSocket.js successfully? I'd like to know how can it be used to establish a safe channel between the browser and a zeromq server app. Is there other/better options for such use case?
Carlo Pires
  • 4,606
  • 7
  • 32
  • 32
13
votes
4 answers

ZeroMQ DllNotFoundException using .Net Bindings

I am just beginning to use ZeroMQ and am experimenting with some of the samples. I am using the C# language bindings and have run into an issue with getting a DllNotFound Exception. I can Load and run samples on My development machine after having…
Learning1
  • 131
  • 1
  • 3
13
votes
3 answers

ZeroMQ / ØMQ / 0MQ how to get started?

I am trying to use ZeroMQ / ØMQ / 0MQ (which ever you prefer) on Windows using C# Binding. Is there any beginner materials out there? Do I need to register ZeroMQ DLL on Windows or something in order to run the C# Binding samples (local_lat /…
Jeff
  • 13,079
  • 23
  • 71
  • 102
13
votes
1 answer

zeromq on embedded cortexM3 platform

Does anyone have already implemented zeroMQ as reliable message solution on cortexM3 nodes? I'm trying to understand if it is possible and to have a memory footprint idea of this. I will have freeRTOS OS maybe. Thanks for ideas and…
user3162481
  • 133
  • 1
  • 4
13
votes
2 answers

What reliability guarantees (if any) does ZMQ make for PUB/SUB over epgm?

I've got an app sending messages on an epgm PUB socket to one or more epgm SUB sockets. Things mostly work, but if a subscribing application is left up long enough, it will generally end up missing a message or a few messages. (My messages have…
scott
  • 1,127
  • 1
  • 12
  • 21
13
votes
1 answer

Inter-child-process communication options in node.js cluster

So I'm working on a node.js game server application at the moment, and I've hit a bit of a wall here. My issue is that I'm using socket.io to accept inbound connections from game clients. These clients might be connected to one of several Zones or…
Brian
  • 3,013
  • 19
  • 27
13
votes
2 answers

Ordering of the messages

Does ZeroMQ guarantee the order of messages( FIFO ). Is there an option for persistence. Is it the best fit for IPC communications. Does it allow prioritizing the messages. Does it allow prioritizing the receivers. Does it allow both synchronous…
PhiberOptixz
  • 512
  • 6
  • 13
13
votes
2 answers

Advice on using ZeroMQ

I'm developing a new client-server app (.Net) and have up until now been using WCF, which suits the app's request-response approach nicely. However I've been asked to replace this with a socket-based solution, partly to support non-.Net clients, and…
Andrew Stephens
  • 9,413
  • 6
  • 76
  • 152
12
votes
1 answer

Why does (Py)ZeroMQ open so many Unix socket files?

I tried to monitor the number of open Unix socket files with lsof -U | wc -l while I executed this code: >>> import zmq # 1375 Unix socket files >>> c = zmq.Context() # 1377 Unix socket files >>> s = c.socket(zmq.PUSH) # 1383 Unix socket files >>>…
Peque
  • 13,638
  • 11
  • 69
  • 105
12
votes
1 answer

ZeroMQ failing to communicate between two Docker containers

I'm trying to set up a toy example of Docker networking with ZeroMQ in macOS, where the serverd.py sends a message to the clientd.py and the client simply displays it using PUSH/PULL. If I run them outside of the container they work fine, but I'm…
Jimmy C
  • 9,270
  • 11
  • 44
  • 64