[zeromq-dev] Switched from 2.1.7 to 3.0.0alpha, XREP to XREP now communication Fails

Rodolfo Narciso Duldulao Jr. rduldulao at chikka.com
Wed Aug 17 11:02:44 CEST 2011

Hello all,

We are creating a ZMQ-based API for our application integration project and we basically have XREP-XREP communication going on. I was using pyzmq 2.1.7 and libzmq2.1.7 where encountered a problem where a socket connecting to the same address twice terminates our program with an Assertion Failed error.  As per suggestion by an expert, I moved to using libzmq3.0.0 (alpha) where the double connect problem disappeared, however,  now all  XREP-XREP communication do not happen (whereas they were successful in 2.1.7).

The PyZMQ page says no code changes necessary so basically all I did was change to 3.0.0a.  I've tested REQ-REP,  REQ-XREP and these setup seems to work just fine.  I've written a testing code which flows as follows:

#server part
 context = zmq.Context()

 socket = context.socket(zmq.XREP)
 socket.setsockopt(zmq.IDENTITY, "A")
 poller = zmq.Poller()
 poller.register(socket, zmq.POLLIN)
 while True:
      socks = dict(poller.poll(0))
      if socks and socks.get(socket) == zmq.POLLIN:
          msg = socket.recv_multipart()
   print msg

#requesting party

 context = zmq.Context()
 socket = context.socket(zmq.XREP)
 socket.setsockopt(zmq.IDENTITY, "B")
 sleep(n) #have tried n > 0, to let the connecting push through
 socket.send_multipart(['A','','TEST']) #nothing gets printed on the other side

Thank you very much

RN Duldulao, Jr.
ZMQ Noobie.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110817/6b7e13c9/attachment.htm>

More information about the zeromq-dev mailing list