Re: [zeromq-dev] Sending via ROUTER socket to ROUTER socket fails initially with No route to host

2013-04-09 Thread Anoop Karollil
Thanks Pieter. Does the hand shaking happen at connect? Because suppose there is a delay after the connect, before the initial send, the send succeeds. If the handshaking does happen at connect, and if it is possible to make sure the connect returns only after the handshaking is done, that

Re: [zeromq-dev] Sending via ROUTER socket to ROUTER socket fails initially with No route to host

2013-04-08 Thread Pieter Hintjens
OK, we found it. There is some internal handshaking before a message can be routed, even if the ROUTER socket connects out. There's no way for libzmq to know the identity of the peer until it receives the identity from the peer. ROUTER pipes are created only for known identities, i.e. for a peer

Re: [zeromq-dev] Sending via ROUTER socket to ROUTER socket fails initially with No route to host

2013-04-05 Thread Anoop Karollil
Pieter Hintjens wrote: On Mon, Apr 1, 2013 at 6:23 PM, Anoop Karollil anoop.karol...@gmail.com wrote: Pieter, any clue as to why the send with the connected (not bound) ROUTER socket might be failing initially? No clue, but if you can make a minimal test case in C, we can investigate. Afaik

Re: [zeromq-dev] Sending via ROUTER socket to ROUTER socket fails initially with No route to host

2013-04-03 Thread Pieter Hintjens
On Mon, Apr 1, 2013 at 6:23 PM, Anoop Karollil anoop.karol...@gmail.com wrote: Pieter, any clue as to why the send with the connected (not bound) ROUTER socket might be failing initially? Please see my previous email on this thread for more details about what I am seeing. No clue, but if you

Re: [zeromq-dev] Sending via ROUTER socket to ROUTER socket fails initially with No route to host

2013-03-26 Thread Pieter Hintjens
On Tue, Mar 26, 2013 at 12:53 AM, Anoop Karollil anoop.karol...@gmail.com wrote: 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

Re: [zeromq-dev] Sending via ROUTER socket to ROUTER socket fails initially with No route to host

2013-03-26 Thread Anoop Karollil
Hi Mark, ROUTER sockets can be used to do sends and receives in any order. See Send/receive pattern for it here: http://api.zeromq.org/3-2:zmq-socket Anoop A. Mark wrote: Hi Anoop! As I understand ZMQ_ROUTER sockets are like ZMQ_REP socket in that they must receive a msg first. You cannot

Re: [zeromq-dev] Sending via ROUTER socket to ROUTER socket fails initially with No route to host

2013-03-26 Thread Anoop Karollil
On 13-03-25 11:14 PM Pieter Hintjens p...@imatix.com wrote to ZeroMQ development list zeromq-dev@lists.zeromq.org : On Tue, Mar 26, 2013 at 12:53 AM, Anoop Karollil anoop.karol...@gmail.com wrote: When I try sending messages via a ROUTER socket to a ROUTER socket (both having their

Re: [zeromq-dev] Sending via ROUTER socket to ROUTER socket fails initially with No route to host

2013-03-26 Thread Anoop Karollil
On 13-03-26 11:07 AM Pieter Hintjens p...@imatix.com wrote to ZeroMQ development list zeromq-dev@lists.zeromq.org : * 0MQ sockets manage a set of pipes to connected peers * A pipe is created either on a connect (at once) or when an incoming connection arrives * No pipe means messages can't be

Re: [zeromq-dev] Sending via ROUTER socket to ROUTER socket fails initially with No route to host

2013-03-26 Thread Pieter Hintjens
On Tue, Mar 26, 2013 at 10:09 PM, Anoop Karollil anoop.karol...@gmail.com wrote: And yes, like you said, the send after connect succeeds if there is a pause in between. The send should work immediately after connect, which creates a pipe at once. It's the bind that's troublesome. -Pieter

Re: [zeromq-dev] Sending via ROUTER socket to ROUTER socket fails initially with No route to host

2013-03-26 Thread Anoop Karollil
Pieter Hintjens wrote: On Tue, Mar 26, 2013 at 10:09 PM, Anoop Karollil anoop.karol...@gmail.com wrote: And yes, like you said, the send after connect succeeds if there is a pause in between. The send should work immediately after connect, which creates a pipe at once. It's the bind that's

Re: [zeromq-dev] Sending via ROUTER socket to ROUTER socket fails initially with No route to host

2013-03-26 Thread A. Mark
I see, so since it's unrestricted it's fine with ROUTER to ROUTER, but with REQ-ROUTER is not going to work. On Tue, Mar 26, 2013 at 2:55 PM, Anoop Karollil anoop.karol...@gmail.comwrote: Pieter Hintjens wrote: On Tue, Mar 26, 2013 at 10:09 PM, Anoop Karollil anoop.karol...@gmail.com wrote:

[zeromq-dev] Sending via ROUTER socket to ROUTER socket fails initially with No route to host

2013-03-25 Thread Anoop Karollil
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

Re: [zeromq-dev] Sending via ROUTER socket to ROUTER socket fails initially with No route to host

2013-03-25 Thread A. Mark
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