jeromq icon indicating copy to clipboard operation
jeromq copied to clipboard

Java examples for the ZeroMQ guide are not synced with JeroMQ.

Open rvlander opened this issue 7 years ago • 2 comments

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

rvlander avatar Oct 22 '17 17:10 rvlander

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 avatar Oct 23 '17 01:10 daveyarwood

@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.

rvlander avatar Oct 23 '17 06:10 rvlander