[zeromq-dev] Trouble with Node Coordination (syncpub/syncsub) example
Dylan Cali
calid1984 at gmail.com
Tue Mar 17 16:31:36 CET 2015
I've been getting a lot of weird/errant behavior with this example, and I'm
wondering if it should be revised or replaced. The problems manifest
across languages, so this doesn't appear to be an issue with a particular
binding.
The most common problems were subscribers either finishing with less than
the full million messages received or not receiving the END message and
never exiting.
Here's the problem first in Ruby. Notice that the subscribers that do
finish don't receive the full complement of messages, and that there are
two subscribers who never received the END message which I have to manually
kill:
https://gist.github.com/calid/798fd4250cb5e8ac100c#file-ruby
Next the same issues in Java:
https://gist.github.com/calid/798fd4250cb5e8ac100c#file-java
And in Perl:
https://gist.github.com/calid/798fd4250cb5e8ac100c#file-perl
Python finished succesfully and all the subscribers received the full 1M
messages.. except one, which received 2M messages?!
https://gist.github.com/calid/798fd4250cb5e8ac100c#file-python
Most of the issues can be resolved by playing with hwm settings or the
sleep count, although the 2M messages issue has me stumped (also observed
this in Perl).
Regardless, as a beginner example perhaps it should be rethought, or at the
very least add a note that it may not work as advertised.
Cheers,
Dylan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150317/16cf1527/attachment.htm>
More information about the zeromq-dev
mailing list