ZeroMQ v4.2.3 Release Notes
Release Date: 2017-12-13 // over 6 years ago-
๐ 0MQ version 4.2.3 stable, released on 2017/12/13
API change: previously ZMQ_POLLOUT on a ZMQ_ROUTER socket returned always
true due to how the type works. When ZMQ_ROUTER_MANDATORY is set, sending
fails when the peer is not available, but ZMQ_POLLOUT always returns true
anyway, which does not make sense. Now when ZMQ_ROUTER_MANDATORY is set,
ZMQ_POLLOUT on a ZMQ_ROUTER will return true only if at least one peer is
available.
Given ZMQ_POLLOUT with ZMQ_ROUTER was not usable at all previously, we do
not consider this a breakage warranting a major or minor version increase.ZMQ_IDENTITY has been renamed to ZMQ_ROUTING_ID and ZMQ_CONNECT_RID has been
renamed to ZMQ_CONNTECT_ROUTING_ID to disambiguate. ZMQ_IDENTITY and
ZMQ_CONNECT_RID are still available to keep backward compatibility, and will
๐ be removed in a future release after further advance notice.DRAFT API change: zmq_poller_wait, zmq_poller_wait_all and zmq_poller_poll
โฑ have been changed to be inline with other existing APIs that have a timeout
to return EAGAIN instead of ETIMEDOUT as the errno value.
๐ See #2713 for details.Existing non-DRAFT socket types ZMQ_REP/REQ, ZMQ_ROUTER/DEALER and
๐ ZMQPUB/SUB, that were previously declared deprecated, have been reinstated
๐ as stable and supported. See #2699 for details.๐ Tweetnacl: add support for, and use preferably if available, getrandom() as
a simpler and less error-prone alternative to /dev/urandom on OSes where it
๐ง is available (eg: Linux 3.18 with glibc 2.25).๐ Curve: all remaining traces of debug output to console are now removed, and
๐ new DRAFT events are available to properly debug CURVE, PLAIN, GSSAPI and
๐ ZAP events and failures. See below for details on the new events.๐ New DRAFT (see NEWS for 4.2.0) socket options:
- ZMQ_GSSAPI_PRINCIPAL_NAMETYPE and ZMQ_GSSAPI_SERVICE_PRINCIPAL_NAMETYPE, for
the corresponding GSSAPI features. Additional definitions for principal
name types:- ZMQ_GSSAPI_NT_HOSTBASED
- ZMQ_GSSAPI_NT_USER_NAME
- ZMQ_GSSAPI_NT_KRB5_PRINCIPAL
๐ See doc/zmq_gssapi.txt for details.
- ZMQ_BINDTODEVICE (Linux only), which will bind the socket(s) to the
๐ง specified interface. Allows to use Linux VRF, see:
๐ https://www.kernel.org/doc/Documentation/networking/vrf.txt
NOTE: requires the program to be ran as root OR with CAP_NET_RAW - ZMQ_ZAP_ENFORCE_DOMAIN, enables strict RFC 27 compatibility mode and makes
๐ the ZAP Domain mandatory when using security. See:
https://rfc.zeromq.org/spec:27/ZAP
See doc/zmq_setsockopt.txt and doc/zmq_getsockopt.txt for details.
๐ New DRAFT (see NEWS for 4.2.0) context options:
- ZMQ_THREAD_AFFINITY_CPU_ADD and ZMQ_THREAD_AFFINITY_CPU_REMOVE (Posix only),
๐ to add and remove CPUs to the affinity set of the I/O threads. Useful to pin
the background threads to specific CPUs. - ZMQ_THREAD_NAME_PREFIX (Posix only), to add a specific integer prefix to the
background threads names, to easily identify them for debugging purposes.
See doc/zmq_ctx_set.txt and doc/zmq_ctx_get.txt for details.
๐ New DRAFT (see NEWS for 4.2.0) message property name definitions to facilitate
the use of zmq_msg_gets:- ZMQ_MSG_PROPERTY_ROUTING_ID
- ZMQ_MSG_PROPERTY_SOCKET_TYPE
- ZMQ_MSG_PROPERTY_USER_ID
- ZMQ_MSG_PROPERTY_PEER_ADDRESS
See doc/zmq_msg_gets.txt for details.
New DRAFT (see NEWS for 4.2.0) API zmq_socket_get_peer_state, to be used to
query the state of a specific peer (via routing-id) of a ZMQ_ROUTER socket.๐ New DRAFT (see NEWS for 4.2.0) Socket Monitor events:
- ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL, unknown system error and returns errno
- ZMQ_EVENT_HANDSHAKE_SUCCEEDED, handshake was successful
- ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL, protocol errors between peers or server
and ZAP handler. Returns one of ZMQ_PROTOCOL_ERROR_* - see manpage for list - ZMQ_EVENT_HANDSHAKE_FAILED_AUTH, failed authentication, returns ZAP status
๐ These events trigger when the ZMTP security mechanism handshake is
completed or failed. See doc/zmq_socket_monitor.txt for more information.
New DRAFT (see NEWS for 4.2.0) zmq_proxy_steerable command 'STATISTICS' to
retrieve stats about the amount of messages and bytes sent and received by
the proxy. See doc/zmq_proxy_steerable.txt for more information.โ Add new autoconf --disable-libunwind option to stop building with libunwind
even if it is available.โ Add new autoconf --disable-Werror option to avoid building with the Werror
flag.๐ Use pkg-config as the first method for finding and building with external
optional dependencies such as libnorm, libpgm and gssapi.On Posix platform where the feature is available, name the ZMQ background
threads to simplify debugging: "ZMQbg/<num_thread>"Improve performance of zmq_poller_* (and zmq_poll and zmq_proxy when building
with DRAFT APIs enabled).๐จ The TCP unit tests have been refactored to bind and connect to random ports
โ rather than hard-coded ones, to allow running tests in parallel.
There are 6 exceptions where it is necessary to use an hard-coded port to
โ test specific code paths that would not be exercised when binding to a
โ wildcard port. These are listed in tests/testutil.hpp so that distributions
can easily patch them if they wish to and so that they can be unique across
โ all the tests, allowing parallel runs.
โ The IPC unit tests have been changed as well to use unique socket file names
โ per test, where before there were some clashes.๐ Fixed #2349 - fix building with libsodium when using CMake
๐ Fixed #2334 - do not assert when tuning socket options fails due to network
errors, but simply retry again when connecting or send a socket monitor
ZMQ_EVENT_ACCEPT_FAILED event when binding๐ Fixed #2341 - fix source files path in VS2015 solution
๐ Fixed #2344 - Note that on Windows with VS2012 it is mandatory to increase
0๏ธโฃ the default stack size to at least 2MBFixed #2348 - ZMQ_ROUTER send with ZMQ_ROUTER_MANDATORY can be stuck in case of
network problem๐ Fixed #2358 - occasional abort on zmq_connect on Windows
Fixed #2370 - zmq_curve_keypair should return an error on failure rather
than ignoring them and always returning 0Fixed #2452 - __STDC_LIMIT_MACROS before precompiled headers causes VC++
โ warning๐ Fixed #2457 - fix building with libsodium in Visual Studio solutions
๐ Fixed #2466 - add const qualifier to internal and public API that does not
modify parameters๐ Fixed #2471 - do more checks for OOM conditions when dynamic allocations is
๐ used๐ Fixed #2476 - assertion causes abort after ZAP stop at shutdown
๐ Fixed #2479 - improve zmq_poller performance on Windows
๐ Fixed #2481 - potential memory leaks due to ZMTP handshake failures
Fixed #2531 - ZMQ_GSSAPI_PRINCIPAL sockopt has no effect on client side
๐ Fixed #2535 - add BUILD_SHARED and BUILD_STATIC options to CMake, both on by
๐ default, to toggle shared and static library buildsFixed #2537 - use SYSTEM_CLOCK on OSX and CLOCK_MONOTONIC elsewhere for
internal timers to avoid racesFixed #2540 - new zmq_poller used by zmq_poll without DRAFTs
๐ Fixed #2552 - Fix WITH_DOC CMake build to avoid checking for asciidoc if the
option is disabled๐ Fixed #2567 - Memory leak in REP socket handling
๐ Fixed #2579 - Compilation issue on Windows with CMake + ninja
๐ Fixed #2588 - SIGBUS under 64-bit SunOS Sparc
Fixed #2590 - crash when using ZMQ_IMMEDIATE and ZMQ_LINGER to non-zero
๐ Fixed #2601 - XPUB_MANUAL subscriptions not removed on peer term
๐ Fixed #2602 - intermittent memory leak for ZMQ_REQ/REP send/recv
๐ Fixed #2608 - CURVE server (connect) fails when client rebinds
๐ Fixed #2610 - print backtraces in mutual exclusion to avoid mixing
different traces๐ Fixed #2621 - add missing CMake files to distributable tarball
๐ Fixed #2630 - improve compatibility with OpenBSD w.r.t. IPV6_V6ONLY
๐ Fixed #2638 - note in INSTALL that when using Windows builds on Linux with
Wine it is necessary to increase the minimum TCP buffers๐ Fixed #2632 - Fix file descriptor leak when using Tweetnacl (internal NACL
implementation) instead of Libsodium, and fix race condition when using
multiple ZMQ contexts with Tweetnacl๐ Fixed #2681 - Possible buffer overflow in CURVE mechanism handshake.
๐ NOTE: this was protected by an assert previously, so there is no security
risk.Fixed #2704 - test_sockopt_hwm fails occasionally on Windows
๐ Fixed #2701 - pgm build via cmake doesn't link libzmq with libpgm
๐ Fixed #2711 - ZAP handler communication errors should be handled consistently
Fixed #2723 - assertion in src\select.cpp:111 or hang on zmq_ctx_destroy on
๐ Windows๐ Fixed #2728 - fix support O_CLOEXEC when building with CMake
๐ Fixed #2761 - improve compatibility with TrueOS (FreeBSD 12)
๐ Fixed #2764 - do not unlink IPC socket files when closing a socket to avoid
race conditions๐ Fixed #2770 - support lcov 1.13 and newer
Fixed #2787 - add libiphlpapi to PKGCFG_LIBS_PRIVATE for static mingw builds
๐ Fixed #2788 - document that adding -DZMQ_STATIC is required for Windows
๐ static builds with MingwFixed #2789 - description of zmq_atomic_counter_value return value is cloned
from zmq_atomic_counter_new๐ Fixed #2791 - fix building with DRAFT APIs on CentOS 6
๐ Fixed #2794 - router_t methods should not allocate memory for lookup in
outpipes๐ Fixed #2809 - optimize select() usage on Windows
๐ Fixed #2816 - add CMake and autoconf check for accept4, as it is not
๐ available on old Linux releases, and fallback to accept + FD_CLOEXECFixed #2824 - ZMQ_REQ socket does not report ZMQ_POLLOUT when ZMQ_REQ_RELAXED
is set๐ Fixed #2827 - add support for Haiku
๐ Fixed #2840 - fix building with VS2008
๐ Fixed #2845 - correct the ZMQ_LINGER documentation to accurately reflect that
๐ the default value is -1 (infinite). It never was 30 second in any released
๐ version, it was only changed briefly and then changed back, but the manpage
โช was not reverted.๐ Fixed #2861 - CMake/MSVC: export ZMQ_STATIC when needed.
- ZMQ_GSSAPI_PRINCIPAL_NAMETYPE and ZMQ_GSSAPI_SERVICE_PRINCIPAL_NAMETYPE, for