[nanomsg] Re: Messages get lost using the pub/sub model

  • From: "Garrett D'Amore" <garrett@xxxxxxxxxx>
  • To: "nanomsg@xxxxxxxxxxxxx" <nanomsg@xxxxxxxxxxxxx>
  • Date: Sun, 5 Jun 2016 23:27:44 -0700

This change is already integrated now for nn_bind() in the 1.0.0rc1.  And
yes, it does remove that need.

On Sun, Jun 5, 2016 at 3:17 PM, Robbin Carlson <robbin.carlson@xxxxxxxxx>
wrote:

From one of GA’s prior messages I quote:

The final issue, and one I’m on the fence about, is the idea to make
nn_bind() synchronous — at least the “listen and bind to address” part,
while the underlying accept() would be asynchronous.  I have ideas as to
how to do this, but it involves some larger surgery, and it isn’t 100%
clear to me that we should hold back 1.0 pending this change, which IMO
would represent some risk.


Would this proposed change remove the need to pause between bind/connect
and the first use?

RC




On Sun, Jun 5, 2016 at 11:47 AM, Garrett D'Amore <garrett@xxxxxxxxxx>
wrote:

The first message the server sends is lost, because the clients
haven’t connected yet when the send takes place.

If you ask the server to wait for > 1 sec (perhaps 2 seconds) before
sending the first message, then that will give the clients a chance to
connect, and it will be fine.

 - Garrett




Other related posts: