Re: [zeromq-dev] Router socket messages lost when too quick after connection and how to know if ready to send

2013-07-27 Thread Pieter Hintjens
You can use ZMQ_ROUTER_MANDATORY to get an error if a message is unroutable. But in any case it will never block on sending. On Thu, Jul 25, 2013 at 9:39 PM, Justin Karneges jus...@affinix.com wrote: On 07/25/2013 12:28 PM, Yannick Hold-Geoffroy wrote: Hello everyone, I've got two questions

[zeromq-dev] Router socket messages lost when too quick after connection and how to know if ready to send

2013-07-26 Thread Yannick Hold-Geoffroy
Hello, For people wanting to know the answer to my question: the solution is in the (new from 3) ZMQ_ROUTER_MANDATORY flag http://api.zeromq.org/3-2:zmq-setsockopt#toc23. In pub-sub patterns or similar, numbering the communications is enough to know if a message was dropped (as explained in the

[zeromq-dev] Router socket messages lost when too quick after connection and how to know if ready to send

2013-07-25 Thread Yannick Hold-Geoffroy
Hello everyone, I've got two questions about router sockets. First, it seems I must wait for a while after connecting a router socket before sending data to its newly connected destination using pyzmq. This simple use case http://pastebin.com/kPK2ZAc5 shows the problem on my system using pyzmq

Re: [zeromq-dev] Router socket messages lost when too quick after connection and how to know if ready to send

2013-07-25 Thread Justin Karneges
On 07/25/2013 12:28 PM, Yannick Hold-Geoffroy wrote: Hello everyone, I've got two questions about router sockets. First, it seems I must wait for a while after connecting a router socket before sending data to its newly connected destination using pyzmq. This simple use case

[zeromq-dev] Router socket messages lost when too quick after connection and how to know if ready to send

2013-07-25 Thread Yannick Hold-Geoffroy
Hello Justin, Is there a way to monitor the drop(s) from a router socket? My first question was exactly about building something on top of a router socket to know which connections are already made. But that would involve adding an arbitrary sleep before sending data, which I can't call reliable