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

2018-10-11 Thread Doron Somech
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 
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 
> 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@lists.zeromq.org
>> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


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

2018-10-10 Thread James Harvey
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 
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@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev