[zeromq-dev] Sending via ROUTER socket to ROUTER socket fails initially with "No route to host"
A. Mark
gougolith at gmail.com
Tue Mar 26 03:27:40 CET 2013
Hi Anoop!
As I understand ZMQ_ROUTER sockets are like ZMQ_REP socket in that they
must receive a msg first. You cannot send a msg off the ZMQ_ROUTER socket
without it already had received a
msg first. In your example you send to the broker first. Also in your loop
there should be REQ-REP pattern eventually somewhere.
-Mark
On Mon, Mar 25, 2013 at 4:53 PM, Anoop Karollil <anoop.karollil at gmail.com>wrote:
> Hello,
>
> I am using ZeroMQ 3.2.2 and PyZMQ 13.0.0.
>
> When I try sending messages via a ROUTER socket to a ROUTER socket (both
> having their identities set), with ZMQ_ROUTER_MANDATORY set, the initial
> send of the destination sock identity (sent before actual message for
> routing) fails once, but succeeds after.
>
> Please see attached C or Python file which reproduces the behavior. It
> seems to happen only if the SNDMORE option is set - which if my
> understanding is correct is what should be done while sending the
> destination socket identity, before the actual message is sent with the
> SNDMORE flag unset.
>
> Is this intended behavior or am I doing something wrong?
>
> The C program gives the following output:
>
>
> Sending address...
> Error: No route to host
> Sending address...
> Success!
> Sending Hello...
> Success!
>
>
>
> Thanks,
> Anoop
>
> _______________________________________________
> 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/20130325/9af34005/attachment.htm>
More information about the zeromq-dev
mailing list