jeromq
jeromq copied to clipboard
Java examples for the ZeroMQ guide are not synced with JeroMQ.
Disclaimer, I am new to ZeroMQ.
I want to toy with the examples in the ZeroMQ Guide, but the function ZMQ.poll
in JeroMQ seems to have a different signature from the one used in the guide (in Java based examples).
Looking at the JeroMQ's javadoc, ZMQpoll
needs a Selectable
passed as first argument, where do I get this object from?
Thanks
Hi @rvlander, welcome!
From what I can tell, JeroMQ's API is beginning to diverge somewhat from that of jzmq, the other Java ZMQ library. It is unclear to me which library's examples should be used in the zguide, so if you are going to use JeroMQ, I would recommend using the zguide example implementations in this repo for reference.
See the mspoller example in particular for an example of how to do polling with JeroMQ. In contrast to jzmq, pollers are created and managed via the context, so that they can be cleaned up when the context is terminated.
@daveyarwood, many thanks.
I was sure that the zguide examples for JeroMQ had to be on this repo somewhere, but apparently I am not so good at searching.
I think both libraries examples should be linked to from the zguide.