Cool, I needed some confirmation that close/reconnect isn't evil/ frowned upon.
Thanks, Mathijs On 20 aug, 16:10, Joshua Foster <[email protected]> wrote: > The best way I have found is to use a Poller in addition to the REQ socket. > It lets you set a timeout on the recv. If you don't recv in an expected time, > do a resend (you may need to close and reconnect). > > Joshua > > On Aug 20, 2011, at 6:44 AM, Mathijs Kwik wrote: > > > > > > > > > > > Hi all, > > > If process1 uses a REQ socket to send a message to process2, but > > process2 dies before replying, process1 gets stuck, waiting for an > > answer to arrive forever. Using identity doesn't help, since the > > message was already delivered. > > The socket doesn't allow sending new requests until the previous one > > gets answered. > > > Do I need to create some kind of timeout mechanism to close/recreate/ > > reconnect the socket if no response is received in time? And store the > > message temporarily, so I can resend it on timeout. > > > Or is there a better/built-in way to handle this? > > > Thanks, > > Mathijs > > > _______________________________________________ > > zeromq-dev mailing list > > [email protected] > >http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > _______________________________________________ > zeromq-dev mailing list > [email protected]http://lists.zeromq.org/mailman/listinfo/zeromq-dev _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
