[zeromq-dev] Publish / Subscribe vs Multicast
Martin Sustrik
sustrik at 250bpm.com
Tue Feb 16 17:25:52 CET 2010
gonzalo diethelm wrote:
> 1. Why does sender try to send all messages to one receiver when there
> is no sleep between messages? Is it due to batching? My messages are 32
> bytes long.
I suppose the problem is all the messages are sent immediately after
first receiver connects. When the second one connects there are no
messages remaining. 0MQ is very fast. If you wan to test in at full
speed you should process messages in orders of millions rather than
thousands.
> 2. It seems after a message has been sent to one receiver, there is no
> retry; if the receiver stopped receiving messages, and there are more
> receivers willing to receive, they still don't get any messages. Right?
Right. The flow control should be done by limiting number of messages on
the fly. That way if the receivers stops processing messages or is
simply falling behind, limit is hit and messages are re-routed to other
receivers.
Unfortunately, this feature is not yet ported from 0MQ/1.0. It is being
worked on and will be available in couple of weeks time.
> 3. It would be nice if zmq_sleep() took milliseconds instead of seconds
> as a parameter.
Yeah. It would be nice. However, I am not sure whether all the platforms
we are running on support usleep... to be investigated.
> When I get back to the office, I will finish the butterfly tutorial.
!
Martin
More information about the zeromq-dev
mailing list