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
6
votes
3 answers

DllNotFoundException: libzmq

I'm trying to use ZeroMQ C#-binding ( http://www.zeromq.org/bindings:clr ) for communicating with a server for a game I'm creating in Unity (I'm using Mac OS X 10.8). I therefore created a simple function that connects to a server, sends a message…
6
votes
2 answers

Why is this JeroMQ (ZeroMQ port) benchmark so slow?

I would like to use this library I found, it's a pure java port (not a wrapper) of zeromq. I am trying to test it and while it claims some good numbers, the test I am performing is giving rather poor results and it's even performed locally (client…
Dan
  • 11,077
  • 20
  • 84
  • 119
6
votes
1 answer

ZeroMQ Client Lose Connection

I have a client (PULL) connect to the server (PUSH). At first they work just fine. But later the connection is broken, and client-side ZeroMQ doesn't try to reconnect to server. One mysterious thing is that if I do netstat in client side and server…
Jerry
  • 789
  • 1
  • 13
  • 31
6
votes
1 answer

Sending raw bytes over ZeroMQ in Python

I'm porting some Python code that uses raw TCP sockets to ZeroMQ for better stability and a cleaner interface. Right off the bat I can see that a single packet of raw bytes is not sent as I'm expecting. In raw sockets: import socket sock =…
Yuval Adam
  • 161,610
  • 92
  • 305
  • 395
6
votes
2 answers

pyzmq non-blocking socket

Can someone point me to an example of a REQ/REP non-blocking ZeroMQ (0MQ) with Python bindings? Perhaps my understanding of ZMQ is faulty but I couldn't find an example online. I have a server in Node.JS that sends work from multiple clients to the…
ejang
  • 3,982
  • 8
  • 44
  • 70
6
votes
2 answers

zeromq.node installation error Ubuntu 12.04: ' node-gyp rebuild'

I'm trying to install zeromq.node using: $ npm install zmq However, I keep getting the error below. Any help would be much appreciated. gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at…
RobotEyes
  • 4,929
  • 6
  • 42
  • 57
6
votes
1 answer

installing zeromq under pypy

I have installed zeromq under CPython. How can I install it that it runns also under pypy? www.zeromq.org/ The problem is it that zeromq needs Cython.
Davoud Taghawi-Nejad
  • 16,142
  • 12
  • 62
  • 82
6
votes
1 answer

use zeromq to implement actor model

Is there anyone who have implemented actor model using zeromq? how is the performance? What pattern is used? REQ/REP, PUB/SUB or PUSH/PULL? I did use another library called theron. But the performance is not quite well due to the context switch. Is…
Michael D
  • 1,449
  • 5
  • 18
  • 31
6
votes
2 answers

What are the pros/cons for using ZeroMQ Binary Star vs Zookeeper for High Availability?

High Availability Pair-Binary-Star-Pattern Looking to add high availability master/master capabilities in my system, currently considering ZeroMQ Binary Star vs ZooKeeper.
James
  • 15,085
  • 25
  • 83
  • 120
6
votes
1 answer

How to disconnect ZeroMQ socket after timeout?

I've been using ZeroMQ pretty successfully with PHP and wrote a job server. I have an admin script which checks on the health of the server and does stuff like pinging it with a timeout. Everything works great when the server is up, but when it's…
Tim
  • 8,036
  • 2
  • 36
  • 52
6
votes
1 answer

Haskell framework to parallelize non-threadsafe C++ lib

I have a closed source non-threadsafe C++ shared lib that provides one function f :: ByteString -> ByteString. The run-time of this function can be something between one second and a couple of hours. I am looking for a way to distribute the…
5
votes
2 answers

zeromq zmq.Poller & stdin

Is it possible to use zmq.Poller to also poll for data availability on stdin? If not, what would be the most efficient wait to poll, at the some time (ideally), for data availability on zeromq sockets & stdin?
jldupont
  • 93,734
  • 56
  • 203
  • 318
5
votes
3 answers

Limiting queue length with PyZMQ

I want to limit the amount of memory consumed by my ZeroMQ message queues in a Python application. I know that setting the high-water mark will limit the amount that will be queued on the sender side, but is there a way to control how much will be…
5
votes
2 answers

Is zeromq the right solution for peer to peer video chat

I was wondering if my idea of zeromq is right? I was thinking of writing a peer to peer chat application using zeromq but as i read further into it zeromq seems to be more low level than what one would use (tcp sockets). Is zeromq good for writing…
Claire
  • 51
  • 1
  • 2
5
votes
2 answers

ZeroMQ pipeline pattern

I'm implementing a messaging system where external programs called agents are able to communicate via ZeroMq producers. So, every time an event of interest occurs, agent sends a message to ZeroMq. I'm interested in implementing this using pipeline…
Nedo
  • 627
  • 1
  • 10
  • 20