[zeromq-dev] JZMQ socket.setIdentity() doesn't work with ZMQ 4.0.1
Joel Lauener
Joel.Lauener at cern.ch
Wed Oct 16 16:03:04 CEST 2013
Hi,
After updating to jzmq-master and zeromq-4.0.1, we are experiencing problems with Socket.setIdentity() which fails with a nice "Invalid Argument" error. Digging a bit in the JZMQ code I found out that setting ZMQ_IDENTITY is disabled for ZMQ_VERSION_MAJOR > 3. What are the reason for that!? It seems to be there since a long time so most likely it had some use at some point.
FYI here is the guilty code snippet (same for getBytesSockop).
JNIEXPORT void JNICALL Java_org_zeromq_ZMQ_00024Socket_setBytesSockopt (JNIEnv *env,
jobject obj,
jint option,
jbyteArray value)
{
switch (option) {
#if (ZMQ_VERSION_MAJOR <= 3)
case ZMQ_IDENTITY:
#endif
case ZMQ_SUBSCRIBE:
case ZMQ_UNSUBSCRIBE:
... some code ...
default:
raise_exception (env, EINVAL);
return;
}
}
Removing this #if condition the setIdentity call works again with ZMQ 4.0.1.
Cheers,
Joel.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20131016/8916f1d4/attachment.htm>
More information about the zeromq-dev
mailing list