[zeromq-dev] Is HWM supported for PUSH/PULL

Doron Somech somdoron at gmail.com
Thu Oct 11 12:26:41 CEST 2018


Is it InProc or TCP?

The behavior of HWM is to drop or block, not replace. In case of PUSH
socket the send operation should block.

You can use another trick to "replace".
Set the send HWM of the push socket to 100.
Send with DONT_WAIT flag, if the send fail (return EAGAIN), set the linger
of the socket to 0 and close the socket.
Create a new socket and continue sending.







On Wed, Oct 10, 2018 at 1:01 PM James Harvey <jamesdillonharvey at gmail.com>
wrote:

> Which side (send or recv) has the issue with the growing queue?
>
> If it's the recv side and your "extremely slow" process is only calling
> recv rarely then there may be no events to trigger the queue to check the
> HWM.
>
> Try calling zmq_getsockopt[3] with ZMQ_EVENT intermittently on the recv
> socket to see if the issue resolves itself
>
>
>
> On Tue, Oct 9, 2018 at 5:40 PM Anoop K Prabhu <anoop.kp at uncannyvision.com>
> wrote:
>
>> Hi all,
>>
>> I had been working on zmq using push/pull. Assuming that my receiver is
>> extremely slow, I would like the sender to keep sending to the queue of HWM
>> of 100 and keep replacing the data in the queue. Right now, HWM doesn't
>> seem to work and the queue keeps on getting too large (GB's of size). How
>> can I avoid this? Is this a bug with HWM on push/pull technique.
>>
>> Regards,
>> Anoop
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20181011/b38912e9/attachment.htm>


More information about the zeromq-dev mailing list