OK, 

I'm going to send a pull request as the ZMQ_ROUTER_MNDATORY covers the 
counterpart full case also.

Thanks
Min

2012. 12. 7. 오후 9:24 Pieter Hintjens <[email protected]> 작성:

> Hi Min,
> 
> I think you could extend ZMQ_ROUTER_MANDATORY to this. Mandatory means
> the message must be deliverable, or you get an error.
> 
> -Pieter
> 
> On Thu, Dec 6, 2012 at 4:36 AM, Yu Dongmin <[email protected]> wrote:
>> Hello,
>> 
>> As we all know, ROUTER drop messages when 1) a counter part doesn't exist 
>> and 2 ) a counter part is full.
>> 
>> In case of 1) we can catch the case by setting ZMQ_ROUTER_MANDATORY. But in 
>> case of 2) ROUTER drop message silently and the send returns 0.
>> 
>> 
>> Server side ROUTER-DEALER pattern including the proxy (a.k.a device) is hard 
>> to use as I need another treatment at client side.
>> 
>> To make a client simple and avoid the second case of silent dropping, I have 
>> to increase the HWM or unlimited but it could blow memory.
>> 
>> 
>> We might need an another option to detect second case. By detecting the 
>> case, ROUTER user can decide whether he drop it silently (default action), 
>> resend it or wait the counter part is ready.
>> 
>> 
>> My idea is (please ignore option names, they are just examples) in the case 
>> of 2)
>> 
>> if ZMQ_ROUTER_WAIT set router.xsend returns -1 with EAGAIN so system can 
>> wait the counter part is ready
>> Otherwise returns -1 as user can do his treatment.
>> 
>> Thanks
>> Min
>> _______________________________________________
>> zeromq-dev mailing list
>> [email protected]
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> [email protected]
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to