Unicast Transports
ÃMQ provides a set of unicast transports (inproc
, ipc
, and tcp
) and multicast transports (epgm
,
pgm
). Multicast is an advanced technique that weâll
come to later. Donât even start using it unless you know that your
fan-out ratios will make 1-to-N unicast impossible.
For most common cases, use tcp
, which is a
disconnected TCP transport. It is elastic,
portable, and fast enough for most cases. We call this âdisconnectedâ
because ÃMQâs tcp
transport doesnât
require the endpoint to exist before you connect to it. Clients and
servers can connect and bind at any time, can go and come back, and it
remains transparent to applications.
The inter-process ipc
transport is also disconnected. It has one limitation: it does not yet
work on Windows. By convention we use endpoint names with an â.ipcâ
extension to avoid potential conflict with other filenames. On Unix
systems, if you use ipc
endpoints you
need to create these with appropriate permissions; otherwise, they may
not be shareable between processes running under different user IDs. You
must also make sure all processes can access the files, e.g., by running
in the same working directory.
The inter-thread transport, inproc
, is a connected signaling transport. It
is much faster than tcp
or ipc
. This transport has a specific limitation compared to tcp
and ipc
, however the server must issue a
bind request before any client issues a connect. This is something future versions of ÃMQ may fix, but at present ...
Get ZeroMQ now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.