[zeromq-dev] how to implement the subscriber in the black box pattern

Isaiah Turla turlaisaiah at gmail.com
Thu Sep 19 09:38:55 CEST 2013

Hi i have this code

    context = zmq.Context()

    app_worker = context.socket(zmq.PUSH)

    app_sub = context.socket(zmq.SUB)

    while True:
        msg = app_sub.recv()
        msg_data = msg.split(' ',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)

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
turlaisaiah at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130919/a540c056/attachment.htm>

More information about the zeromq-dev mailing list