[zeromq-dev] push/pull and multiple workers

andrea crotti andrea.crotti.0 at gmail.com
Wed Aug 15 13:50:54 CEST 2012


2012/8/15 Apostolis Xekoukoulotakis <xekoukou at gmail.com>:
> Because by the time the second worker connects, the sender has already sent
> both messages to the first one.
>
> The message is not lost. the first worker simply exits after only one
> message.
>


Very good makes sense, but then why this also hangs forever??

if __name__ == '__main__':
    p1 = Process(target=start_send)
    p2 = Process(target=start_receive)
    p3 = Process(target=start_receive)
    p2.start()
    p3.start()
    sleep(0.1)
    p1.start()

I mean now the two receivers are started before the sender does, but
the first receiver gets both messages, is that normal?

In a normal situation probably it won't matter because the first
worker should be busy doing something so the other could get the
message, but just to understand..



More information about the zeromq-dev mailing list