[zeromq-dev] Discussion on ROUTER action

Doron Somech somdoron at gmail.com
Sun Dec 9 11:13:33 CET 2012


Hi,

Min i took a look at the code and in case of pipe full or identity doesn't
exist you are returning the same error, right? i think it better in case
the pipe is full to return eagain, then the SocketBase send method will
continue to try sending the message until timeout or message is sent. also
at the application code i can see a different handling of pipe is full and
pipe doesn't exist.

Doron

What do you think?

On Fri, Dec 7, 2012 at 3:24 PM, Min <miniway at gmail.com> wrote:

> 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 <ph at imatix.com> 작성:
>
> > 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 <miniway at gmail.com> 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
> >> zeromq-dev at lists.zeromq.org
> >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121209/2956ceba/attachment.htm>


More information about the zeromq-dev mailing list