[zeromq-dev] DEALER question

Pieter Hintjens ph at imatix.com
Sat Jun 29 08:54:11 CEST 2013


Hi Alexandr,

You're somewhat misunderstanding what "asynchronous" means in this
case. It means you can send and receive messages without waiting.
There are various strategies 0MQ uses to handle peers coming and
going, but there's nothing to handle the case when all peers go away
for extended periods of time.

For this you have to build (or reuse, because there are 0MQ brokers
that do this) some queuing that survives peers going away. For example
the Majordomo broker lets clients send requests even when there are no
workers to handle them.

-Pieter

On Sat, Jun 29, 2013 at 7:50 AM, Alexandr Druzhnin <drug2004 at bk.ru> wrote:
> Hi all!
> I develop distirbuted application for peer-to-peer network. After
> starting every instance tries to request update state (like clone
> pattern) from known peers (get them from configuration file now). I use
> for it DEALER-ROUTER pair: DEALER connects to all peers and sends
> request and ROUTERs of peers send update state back. It works fine while
> all peers are on-line. But if some peer is off-line, DEALER doesn't send
> request to other peers and the application just hangs up. I thought,
> that DEALER-ROUTER pair allows to create asyncronous input-output, but
> it seems like DEALER is blocked untill all peers will be on-line and I
> can't call it async. I suspect I missed something important. What did I
> do wrong?
>
> Thanks in advance,
> Alexandr
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev



More information about the zeromq-dev mailing list