[zeromq-dev] Dropped message after startup
Martin Hurton
hurtonm at gmail.com
Sat Aug 8 17:57:51 CEST 2009
Hi Robin,
The first message is lost because there is no queue bound to the
global exchange at the time when you send the first message.
You send the message immediately after creating the global exchange so
the remote side has no chance to bound its queue. Zeromq waits at
least 100 ms before reconnecting to global object so 1 second delay
between creating the exchange and sending the message fixes your
problem.
- Martin
On Fri, Aug 7, 2009 at 9:34 PM, Robin Weisberg<robin at scout-trading.com> wrote:
> I found a reproducable bug using the utilities I posted in this email:
> http://lists.zeromq.org/pipermail/zeromq-dev/2009-July/001064.html
>
> The bug seems to be that if you send messages immediately on startup they
> are lost. If you sleep for 1 second before sending the problem goes away.
> The code I provided currently does a sleep, but if you move the sleep to
> after the send call you will see the bug.
>
> If you run:
> ./zmqlisten -e eth0:50001 wimp TEST
> this will print a lot of error messages you can ignore. Then run:
> ./zmqsend -e "eth0:50001" wimp TEST "T"
> You should see something like this:
> error: L_QUEUE
> error: L_QUEUE
> QueueID=1, DATA[1]
> QueueID=1, DATA[2]
> QueueID=1, DATA[3]
> QueueID=1, DATA[4]
> QueueID=1, DATA[5]
> QueueID=1, DATA[6]
> QueueID=1, DATA[7]
> QueueID=1, DATA[8]
> QueueID=1, DATA[9]
>
> Whats missing here is the first message. The output should containt
> "QueueID=0, DATA[0]".
> Adding/removing the sleep will determine if the
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
More information about the zeromq-dev
mailing list