[zeromq-dev] zmq_msg_get('User-Id') on XPUB subscribe/unsubscribe messages raises Invalid argument exception (pyzmq)

Pieter Hintjens ph at imatix.com
Tue Oct 28 10:23:11 CET 2014


I suspect it's simply not been implemented for XPUB sockets... one
would have to debug this at the lower level though. Can you make a
minimal C test case to reproduce it?


On Tue, Oct 28, 2014 at 3:53 AM, Tomas Krajca <tomas at repositpower.com> wrote:
> Hi,
>
> I am not sure whether this is a bug or just has not been implemented for
> XPUB sockets. Basically, I use zmq authentication - SUB socket is my
> client, XPUB is my server - and I would like to see who subscribed to my
> XPUB server. When I try to get a User-Id from the subscribe/unsubscribe
> messages, I get Invalid argument exception. If I do the same for DEALER
> - DEALER, everything works.
>
> I use pyzmq 14.4.0 with libzmq 4.1.0 rc1.
>
> Python exception:
>
> Set up authenticator
> Set up server
> Set up client
> DEBUG:zmq.auth:version: '1.0', request_id: '1', domain: u'', address:
> u'127.0.0.1', identity: '', mechanism: 'CURVE'
> DEBUG:zmq.auth:ALLOWED (CURVE allow any client)
> DEBUG:zmq.auth:ZAP reply code=200 text=OK
> Auth authenticated
> [<zmq.sugar.frame.Frame object at 0x10b4ec0>]
> User-Id:
> Traceback (most recent call last):
>    File "test2.py", line 64, in <module>
>      print "User-Id: ", smsg[-1].get('User-Id')
>    File "zmq/backend/cython/message.pyx", line 375, in
> zmq.backend.cython.message.Frame.get (zmq/backend/cython/message.c:3398)
>    File "zmq/backend/cython/checkrc.pxd", line 21, in
> zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/message.c:3979)
> zmq.error.ZMQError: Invalid argument
>
> Corresponding code is at http://pastebin.com/v6Jm55WK
>
> Thanks,
> Tomas
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev



More information about the zeromq-dev mailing list