Learn the Basics

See more examples...

Core Documentation

ZeroMQ - The Guide explains how to use ZeroMQ as an intelligent transport layer for your distributed apps. Old version for version 2.2.

The ZeroMQ Reference Manual specifies the ZeroMQ API.

The ZeroMQ FAQ by the community is the first place to look for answers to frequently asked questions and problems.

Slideshows

Comparisons

Here is a list of ZeroMQ's features.

In 2011, CERN (the European Organization for Nuclear Research) compared CORBA, Ice, Thrift, ZeroMQ, YAMI4, RTI, and Qpid (AMQP). Read their analysis and conclusions. (PDF).

Who is Using ZeroMQ?

Since ZeroMQ is free software we don't track who uses it. However, some organizations that we know use it are: AT&T, Cisco, EA, Los Alamos Labs, NASA, Weta Digital, Zynga, Spotify, Samsung Electronics, Microsoft, and CERN.

Example Code

This shows a filter that collects data from two different remote publishers and sends it to local subscribers:

import zmq
import time
context = zmq.Context()
 
subscriber = context.socket (zmq.SUB)
subscriber.connect ("tcp://192.168.55.112:5556")
subscriber.connect ("tcp://192.168.55.201:7721")
subscriber.setsockopt (zmq.SUBSCRIBE, "NASDAQ")
 
publisher = context.socket (zmq.PUB)
publisher.bind ("ipc://nasdaq-feed")
 
while True:
    message = subscriber.recv()
    publisher.send (message)

Introductions

Ilya Grigorik writes:

The best way to get started with ZeroMQ is to work through some hands-on examples - the concepts are not new, but the ease with which you can compose them takes some getting use to.

Brian Buchanan writes:

"0MQ sockets being asynchronous means that the timings of the physical connection setup and teardown, reconnect and effective delivery are transparent to the user and organized by 0MQ itself. Further, messages may be queued in the event that a peer is unavailable to receive them."

Andrew Cholakian writes:

"The more time I spend with ZeroMQ, the less I can think of a reason I'd ever have to open up a raw TCP or UDP socket, except in extraordinary circumstances, again."

Nicholas Piël writes:

"ZeroMQ is a messaging library, which allows you to design a complex communication system without much effort."

Zed Shaw writes:

"What ZeroMQ does is create an API that looks a lot like sockets, and feels the same, but gives you the messaging styles you actually want. By simply specifying the type of socket when you call zmq_socket you can have multicast, request/reply, and many other styles."

Video Introductions

This presentation, "ZeroMQ is the Answer", is by Ian Barber at the PHP UK Conference.

FLOSS Weekly's Randal Schwartz and Aaron Newcomb discuss ZeroMQ with Pieter Hintjens:

floss-weekly.jpg

Backgrounders and Whitepapers