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.
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev