Koert,

So you're saying, if you start the subscriber after the publisher, you
don't get messages?

If that's what you're seeing, it's normal.  Pubsub does not wait for
subscribers to connect, and if they arrive after the publisher has
sent its data, they will receive nothing.

-Pieter

On Tue, Sep 21, 2010 at 1:17 PM, Koert Kuipers
<[email protected]> wrote:
> Hello all,
>
> I ran into a problem while developing a server in python. When a program is
> listening to both a REP socket and a SUB socket, using multiplexing (poll),
> messages from the publisher (which should arrive at the SUB socket) get
> lost. This seems to only happen if there are also messages arriving at the
> REP socket, and typically all the messages from the publisher get lost.
>
>
>
> My setup:
>
> Windows XP (I also observed the problem on Ubuntu 10.04)
>
> zeromq 2.0.7
>
> pyzmq
>
>
>
> The problem doesn’t always occur, and is somewhat hard to replicate.
>
>
>
> I ended up convincing myself that there is indeed a problem by writing 3
> little programs. Program 1 listens to REP and SUB socket, program 2 only has
> a PUB socket and sends 1000 messages, and program 3 only has REQ socket and
> does 1000 RPC requests in a row.
>
>
>
> When I start the programs in this order everything works as expected:
>
> Start program 1, then program 2 and then program 3 (program 3 starts while
> program 2 is still working). Program 1 will report it received 1000 messages
> on the PUB socket and 1000 messages on the REP socket.
>
>
>
> But when change the order I get into trouble. I start program 1, then
> program 3 and then program 2 (program 2 starts while program 3 is still
> working). Program 1 will report it received 1000 messages on the REP socket
> but none on the SUB socket.
>
>
>
> Best,
>
> Koert
>
>
>
> PS I attached the 3 programs. Hope that works.
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> [email protected]
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>



-- 
-
Pieter Hintjens
iMatix - www.imatix.com
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to