Hi i have this code

    context = zmq.Context()

    app_worker = context.socket(zmq.PUSH)
    app_worker.bind("tcp://127.0.0.1:9005")

    app_sub = context.socket(zmq.SUB)
    app_sub.connect("tcp://127.0.0.1:9004")
    app_sub.setsockopt(zmq.SUBSCRIBE,'JULES')

    while True:
        msg = app_sub.recv()
        msg_data = msg.split(' ',1)
        app_worker.send_json(msg_data[1])
        print msg_data[1]

but when i run this, it is unable to receive any message from the
publisher, but when i remove the lines,

    app_worker = context.socket(zmq.PUSH)
    app_worker.bind("tcp://127.0.0.1:9005")

it works normally, but i need it to be able to subscribe then process the
message and then push it to another socket.

what am i doing wrong?


Isaiah Edward G. Turla
BS Computer Science
University of the Philippines Diliman
Activities Committee Head - UP CURSOR
[email protected]
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to