On 08/30/2010 03:03 PM, Kelly Brock wrote:

>> What should be done IMO is to implement acks inside 0MQ so that they are
>> invisible to user. The user would set the max number of message on-fly
>> using HWM socket option and that's it.
>
>       Ok, so hmm.  Would the following make sense then:
>
> // Server works as normal except the PUSH side has:
> zmq_setsockopt( s, ZMQ_PUSH_ACK, NULL, 0 );
>
>
> // Clients add:
> zmq_setsockopt( s, ZMQ_PULL_ACK, NULL, 0 );
>
>       The "zmq_recv" will check the option and send an ack to tell the the
> push side to send me a message.  This does not allow me to say I'll receive
> more than one message since that would still require some sort of manual ack
> but it solves the single worker case without any new user size calls.

Yes. Something like that, but:

1. The value should be integer "max number of msgs on-fly".
2. The socket option should be unified with ZMQ_HWM option. Having 
separate options for "window size" and "number of message in-flight" 
seems to be redundant.

Martin
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to