#715: Added a ZCert constructor that takes a Writer as an argument, in order to support writing to the Writer instead of to a file.
#716: Added a ZTicket API, as well as a ZTicker API, which combines ZTimer and ZTicket.
👍 #724: Added support for the XPUB options
#727: Added a ZSocket constructor that takes a SocketType enum value as an argument.
#747: Improvements to ZBeacon:
startServermethods, to support restarting the client or server individually.
- You can now specify the interface address when constructing a BroadcastClient.
#755: Added ZCert constructors that take (mandatory) public and (optional) secret keys as arguments.
🛠 Fixes for Android compatibility:
🚚 #720: Removed a println debug statement in
🛠 #733: Fixed a bug introduced in JeroMQ 0.5.1 where
ZPoller.pollwas returning -1 instead of 1.
🛠 #735: Fixed bugs related to the handling of bytes in the Msg class.
🛠 #759: Fixed an IndexOutOfBoundsException that occurs when the number of subscriptions exceeds the HWM.
👍 #677: ZPoller now supports registering multiple event handlers on a single socket or channel.
#692: Added an overload of the ZBeacon that has an additional
serverAddressoption so that the broadcast address can be specified. The default value is still
#694: Added a draft ZNeedle helper class for serialization and deserialization within a frame.
#697: Added encoding/decoding of the
COMMANDflag when using CURVE encryption.
#698: Added a
#671, #672: In the internal
ZError.InstantiationExceptionis now thrown when a decoder or encoder cannot be instantiated. Previously, a stacktrace would be printed and
nullwould be returned instead of a decoder/encoder instance.
null. This can happen, for example, if the channel is closed.
🛠 #679: Fixed a file descriptor leak when opening a TCP connection.
#680: Various improvements to support for IPv6 and name resolution.
IPv6 is now enabled if the properties
🛠 #684: Fixed a bug where
zmq.Msg.getByteswas writing to an internal buffer instead of the given buffer.
🛠 #688: Javadoc fixes.
🛠 #691: Fixed a bug where timers would accumulate in the PollerBase when failed connections were retried, causing a memory leak.
🛠 #693: Fixed a Java 8-related compilation error.
🚚 #702: Removed all usage of
java.util.Optional, which are known to cause problems for some versions of Android. Replaced their usage with internal implementations.
#556: There is now a
SocketTypeenum that can be used when creating sockets. This is recommended over the old way of using integer values, which is error-prone. The overload of
ZContext.createSocketthat takes an integer is still supported, but is now marked deprecated.
recvStrStreaminstance methods to the
ZMQ.Socketclass. These expose a Stream of incoming messages, each of which is a
#560: ZMsg instance methods can now be chained.
#576: Added an overload of
ZMsg.recvMsgthat takes a
Consumer<ZMsg> handlerand a
Consumer<ZMQException> exceptionHandlerfor handling the result of attempting to receive a message on a socket.
#586: Implemented a Timer API based on the one added to libzmq in version 4.2.
#590: Added a
closeSelectormethod to the ZContext class, to expose a way for selectors created by
createSelectorto be closed. Note that both of these methods are also deprecated; it is not recommended to manage selectors directly, as these are managed for you by pollers.
👍 JeroMQ no longer supports Java 7. Dropping support for Java 7 allows us to leverage the new features of Java 8, including the use of lambda syntax to create IAttachedRunnable and IDetachedRunnable.
#510: Polling now measures time in nanoseconds instead of microseconds, ensuring a higher degree of precision.
🛠 #523: Fixed a bug where ZLoop was closing the context.
🛠 #525: Fixed a bug in
zmq.io.StreamEnginethat was causing an infinite loop in the IO thread, blocking the application with 100% CPU usage.
🛠 #527: Fixed a bug in
zmq.io.StreamEnginewhere data could still be present inside the handshake buffer that was not decoded.
🛠 #535: Fixed an edge case where, once in a blue moon, after a socket fails to connect, and is subsequently closed, it would still try to reconnect as if it weren't closed.
🚀 #546: Prior to this release, when a ZContext was initialized, its internal
ZMQ.Contextwould be null initially, and the ZContext
isClosedinstance method would misleadingly return
ZMQ.Contextwas being created lazily when
getContextwas called on the ZContext. Worse, the internal context would be reset to
nullafter closing a ZContext, which could lead to problems if another thread happened to try to use the ZContext after it was closed, resulting in a new
ZMQ.Contextsecretly being created. Now, the internal
ZMQ.Contextis created upon initialization of the ZContext, and you can rely on it never being null.
⚡️ #548: Various javadoc updates and improvements. There is now a
@Draftannotation to identify work-in-progress APIs that are unstable or experimental.
🛠 #552: Fixed a bug where internal command messages (e.g. HEARTBEAT commands) were disrupting the REQ state machine.
#564: Implemented the ability to bind a socket via IPC or TCP with a dynamic ("wildcard") port and retrieve it via
ZMQ.ZMQ_LAST_ENDPOINT. Leveraged this to make our test suite more reliable.
🛠 #569: Fixed an issue where an overridable method was being used in the ZStar constructor.
🛠 #578: Fixed an issue where an errno of 48 ("address already in use") would persist longer than intended in the process of binding to a random port. Now, errno is reset to 0 after a port is found.
🛠 #581: Fixed a bug where, if you're polling in one thread and you close the context in another thread, it would result in an uncaught ClosedSelectorException.
🛠 #583: Fixed a race condition causing
ZMQ_CONNECT_RIDto sometimes be assigned to the wrong peer socket.
🛠 #597: Fixed a bug causing the context to hang indefinitely after calling
destroy(), if multiple sockets had connected to the same socket.
#609: For numerous methods, when invalid arguments are passed to the method, an InvalidArgumentException with a friendly error message will now be thrown, instead of an assertion error.
#610: Added some asserts in places where there could potentially be NullPointerExceptions.
Options.sndbufwill now adjust
#634: We are now using a 64-bit long, instead of a 32-bit integer, as a cursor in the internal
java.zmq.Signalerclass. This change should not affect the library user, except that it will now take longer for the value to overflow. Previously, with the 32-bit integer cursor, the Signaler could overflow within a month or so under heavy load, causing serious problems such as a server being unable to accept new client connections.
#643: Added some checks in parts of the codebase related to encryption and authentication mechanisms.
#652: IOExceptions that occur during polling will now set
errnomore accurately depending on the exception. Previously, the
errnowould always be set to
EINTRwhen an IOException occurs during polling.
ZError.toStringnow defaults to
"errno " + Integer.toString(code)if a string version of that error code hasn't been implemented.
#654: In a low-level place where an
IllegalStateExceptionwas thrown with no arguments before, the string value of the
errnois now included to provide some context.
#655: In a low-level place in the polling code,
EINTRis now correctly reported to indicate that polling was interrupted, whereas we used to miss it and try to poll again.
#657: When destroying a ZPoller, we will no longer close the poller's Selector, as that is handled by the context.
#659: Made internal optimizations to ZContext. The only visible change should be that the order of the sockets when you call
getSockets()is no longer deterministic, as we are now storing them internally in a Set rather than a List.
#660: When creating a socket and the
maxSocketslimit is reached, a ZMQException is now thrown instead of the more generic IllegalStateException.
#470: Added an argument to the ZBeacon constructor to configure datagram socket blocking behavior. The default behavior (non-blocking) is preserved when the argument is omitted.
- ZAuth, an actor that manages authentication and handles ZAP requests.
- ZCert, an abstraction for CURVE certificates.
- ZCertStore, a sub-optimal store for certificates.
- ZConfig, to manage the ZPL file format.
- ZMonitor, for simplified socket monitoring.
- Reinstated support for the
ZMQ_MSG_ALLOCATORoption. Added a
setMsgAllocatormethod in the ZMQ class for setting a custom message allocator.
#477: Added an overload of
ZAgent.recvthat takes a timeout argument.
ZMQ.Poller, providing a way to call
.close()on a poller when you're done with it and free the selector resource to avoid memory leaks.
It is recommended that you either close a poller or terminate the context when you are done polling.
📚 Miscellaneous Javadoc documentation tweaks/fixes.
🛠 #454: Fixed an issue where the router was interpreting peers' socket identities as UTF-8 strings instead of raw bytes.
🛠 #460: Fixed an issue where CURVE keys were being parsed as strings.
🛠 #465 Various small fixes:
- Fixed an uncaught divide by zero exception (#447).
- ZMQ.Socket class is no longer final.
- Handle interrupt caused by close in ZBeacon.
#468: Fix an issue where sockets would disconnect when network connection was lost.
🛠 #469 Various small fixes:
- Fixed an error in comparison of byte arrays in the Mechanism class.
- Handled the possibility of receiving a null message in ZSocket by returning null instead of throwing an uncaught NullPointerException.
- Fixed the return value of ZMQ.setHWM, which indicates the status of the lower-level calls to set the send and receive HWM, but was doing so incorrectly.
🛠 #478: Fixed an issue where, when using an XPUB/XSUB proxy, the PUB socket was throwing an error when attempting to send a message if all of the subscriptions have been removed.
#479: Various internal improvements.
🛠 #486: Fixed an issue where it was not possible to send two messages in a row without a successful receive in between, even with the RELAXED option set on the REQ socket.
#487 Various improvements:
- Added some method name aliases for compatibility with the jzmq API, in places where the JeroMQ method names differed.
- Miscellaneous internal refactoring to make JeroMQ code more similar to that of jzmq.
- It is not possible to get the values of the ZMQ options
getReqRelaxedare now deprecated and will throw an UnsupportedOperationException when called.
🛠 #492: Fixed an issue where a NullPointerException was thrown when trying to bind on an already used port, for example when the socket has a monitor.
#502: Use explicit mutex locks to help prevent problems caused by concurrent access to a ZContext. This makes ZContext behave more like libzmq's zctx.
#366: support for
🚚 #375: re-added
ZMQ.Socket.disconnect, which had been removed in 0.3.6 because the contributor who originally added it did not agree to the license change from LGPL to MPLv2
- fixed a NullPointerException and mangling of existing indexes in ZMQ.Poller
- fixed a Windows bug in Signaler
- other small changes to keep JeroMQ in sync with jzmq
#386: improved deallocation of polling Selector resources. When creating a poller via
ZContext.createPoller, the context will manage the Selector resources and ensure that they are deallocated when the context is terminated.
💥 #387: (BREAKING CHANGE) It is no longer possible to create a ZMQ.Poller in any way except via a context. This is to ensure that all Selector resources are deallocated when a context is terminated.
ZMQ.Socket.setLingercan now be called safely after a context is terminated.
🛠 #390: fixed a bug where terminating a context while polling would sometimes cause a ClosedChannelException.
🛠 #399: fixed a NullPointerException that would sometimes occur when terminating a context
💥 #400: (BREAKING CHANGE)
- deprecated the setters
ZContext. These parameters are set in the constructor and
final. Because it is no longer possible to set these values after constructing a ZContext, the setters are now no-ops.
- deprecated the setters
#402: added constructors for ZPoller that take a ZContext argument, thus making it possible to create a ZPoller whose Selector resources are managed by the context.
#292: support for
#299: a setter for UncaughtExceptionHandlers in ZBeacon threads
#309: MsgAllocator allows you to define how Msgs are allocated.
#316: ZSocket high-level API allows you to work with sockets directly without having to manage the ZMQ context.
🔄 Changed from LGPL to MPLv2 license.
⏪ Related to changing license, the following changes were made as a result of reverting pre-0.3.6 commits by contributors who did not agree to the license change:
- Slight changes to the way ephemeral ports are handled.
🛠 #266: fixed a NullPointerException bug in
ZMsg.dumpwhen attempting to dump a ZMsg after its frames have been cleared
#324: implementation changes to avoid extra bytes being copied in PUB/SUB
- Capitalize constants
- Use for each style
- Issue #152 - Add unit test to test ZContext.close
- Fix mislabeling issue
- remove me from the AUTHORS file
- Sometimes hostname resolution will fail. Make sure that, if it does, we don't break the ioloop.
- Narrowed exception handling a bit. Makes me kind of nervous because the exceptions thrown are not documented.
- remove email addresses
- Fix issue #166 - Able to build using java 8
- Fix issue #166 - Fix building project in a backwards compatible way
- Replace home grown Multimap with guava
- Update README.md
- Normalize license header preamble that mirrors libzmq
- Add Trevor Bernard as a contributor and sort authors
- typo readme
- Fix issue #176 - Remove auto-generated ant build files
- Overload Socket send
- Fix style violation of unittests
- fix bug where poll does not accept -1 as argument
- Issue #176 - Remove build.xml ant file
- Fix all style violations
- Remove superfluous limit
- Move the wcursor increment after the assert
- Improve imports
- Issue #191 - Generates excess garbage on close
- Port JeroMQ to be based on libzmq 3.2.5
- Remove public method declaration in interfaces
- Revert "Remove public method declaration in interfaces"
- Change Chunk to be a static inner class
- Fix raw type parameterized warnings
- Change constructor and method declarations to be public
- Update plugins
- Fix issue where project wasn't correctly importing using new m2eclipse plugin
- Remove redundant if
- Revert checkstyle plugin update to fix build error
- Add ZBeacon implementation
- Fix checkstyle errors
- Problem: beacon messages are not always filtered out for local addresses
- Problem: current ZBeacon tests are not testing whether messages are received.
- Fix typo
- Revert "Replace home grown Multimap with guava"
- Remove redundant static modifier
- Remove redundant encoding entry
- Fix java6 build problem where req was failing with BOTTOM illegalstateexception
- Remove redundant method
- Fix #209 - Set errno on SocketBase instead of throwing IllegalArgumentException
- Fix issue #197 - Don't call setReuseAddress on windows
- Change version to 3.2.5
- Make Mailbox,Thread and Reaper closeable
- Router Handover
- Rename xterminated into xpipeTerminated to follow libzmq
- Fix exception for inproc bind fail
- Fix issue #200
- Remove redundant nested static modifer from interfaces
- Ignore .checkstyle file
- Fixed two bugs in test path. In flserver3.java ZFrame.equals(string) will always return false. and in cloneserv6.java equals method is called on an Array.
- Revert "Remove redundant method"
- Test receiving correctly a prefetched message when using a poller
- Fix issue #228 - Add ZMQ_BLOCKY to Context to get a less surprising behaviour on context termination
- Implementation proposal for Z-Components: ZPoller, ZAgent, ZStar, ZActor, ZProxy
- Fixed typo in Features section.
- Aligned punctuation and capitalized first letter in sentences.
- pom.xml: missing bracket
- Change ZMQ.bind() method to return void.
- Fixed minor issues - documentation (javadoc links, ..) - possible NPEs - simplified some statements, removed unnecessary variables, ...
- Break loop on finding the first non-printable character
- Fix issue #243 - Add a copy section in the README specifying the license
- Fix issue #245 - Double socket close no longer hangs
- Set daemon flag on poller threads.
- Set daemon flag on beacon and zthread threads.
- Fix Spinning in Reaper Thread
- Added constructors to ZMQException
- Changed ZFrame.recvFrame to return null in non-overloaded method
- Added ENOTSOCK error code
- Added EAGAIN error (code already present)
- Fix resource leak at socket close
- Fix c-style method name
- Various code improvements
- ➕ Add unbind method to org.zeromq.ZMQ.Socket
- ➕ Added double checked locking for shared variable context. getContext() and createSocket() should now be thread safe.
- 👍 Extend support for ZMQ monitors to inline with jzmq
- 💅 Apply checkstyle and sample changes
- 🛠 Fixed recvFrame to return null on no data. Added Test cases.
- 📚 Corrected ZMsg documentation.
- ➕ Adds lazy create context to getContext() method
- 🛠 Fix wrong Router xwrite_activated assert
- 👻 Raise exception when bind fails
- 🛠 Fix issue #80
- 👻 throw an exception if the ByteBuffer provided to Msg is not flipped
- re-resolve tcp addresses on reconnections
- ➕ add convenience methods to set TCP keep alive options
- ♻️ Refactor Msg to better handle memory and Java idiomatic
- 👮 Force StreamEngine to use big endian
- ✂ Remove org.jeromq.* namespace and associated tests
- ⏪ Revert back to use currentTimeMillis because it's less expensive than nanoTime
- 🛠 Fix issue #122 - handshake now uses ByteBuffer accessor methods directly