[zeromq-dev] PGM subscriber assert failure

Advait Alai advaitalai at gmail.com
Sat Apr 16 15:34:31 CEST 2011


Hello,

I'm getting the following error when I try to use the epgm protocol on a
subscriber:

Assertion failed: rc == 0 (connect_session.cpp:96)
Aborted

The publisher publishes messages using epgm without any problem

What's wrong?

=============
Publisher Code (simply publishes messages every 0.1s):
=============

# ZMQ Context


context = zmq.Context()




# Socket to talk to clients


socket = context.socket(zmq.PUB)



# Localhost IP is 10.0.66.1
socket.bind('epgm://10.0.66.1:5561')



while True:
    msg_str = str(time.time())

    socket.send(msg_str)


    print "Published", msg_str


    cnt += 1


    time.sleep(0.1)

=============
Subscriber code:
=============

# Socket to talk to server


context = zmq.Context()


client_socket = context.socket(zmq.SUB)





client_socket.setsockopt(zmq.SUBSCRIBE, "")





# Remote publisher IP is 10.0.66.1


client_socket.connect ("epgm://10.0.66.1:5561")





# Process 5 updates


while True:


    string = client_socket.recv()  # Assert error here


    print string
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110416/f7dd4086/attachment.htm>


More information about the zeromq-dev mailing list