[zeromq-dev] HWM behaviour & blocking
Steffen Mueller
zeromq at steffen-mueller.net
Thu May 10 07:42:44 CEST 2012
On 05/10/2012 12:37 AM, Pieter Hintjens wrote:
> On Wed, May 9, 2012 at 7:45 AM, Steffen Mueller
> <zeromq at steffen-mueller.net> wrote:
>
>> Any chance I could have such a functionality? Of course, being able to
>> determine whether there are any peers connected would be great, too.
>
> The standard answer to "can I do funky routing model XYZ over 0MQ" is
> "yes, you make it yourself using ROUTER sockets". This is why we
> called them that. Particularly, the built-in HWM logic is difficult to
> mix with routing and people who try this always end up frustrated.
> Happily it is easy to layer on top.
>
> It looks like you want a combination of reliable service-oriented
> queue and credit-based flow control. Read the Guide section on
> reliable request reply, in detail. Then read
> http://unprotocols.org/blog:15. Mix this together, taste, improve,
> repeat.
Frankly, I fail to see what's so funky about not wanting to block the
sender if the receiver is restarted, using the queuing of the library[1].
Something as conceptually simple as that can help a great deal in
decoupling component reliability in an HA setup if you don't have to
guarantee timeliness (which is virtually impossible anyway in a
distributed system during a partial failure).
Either way, I understand the message (and Chuck's, too). I'll roll my
own solution.
--Steffen
[1] The connect/bind asymmetry that Chuck pointed out might help in my
case, but it makes scaling the number of receivers a little more
awkward, so I'll have to evaluate the pros and cons carefully.
More information about the zeromq-dev
mailing list