Re: [zeromq-dev] 0MQ keepalive

2014-11-01 Thread Meng Zhang
Thanks @Andrew. -Original Message- From: "Andrew Hume" Sent: ‎2014/‎11/‎2 0:32 To: "ZeroMQ development list" Subject: Re: [zeromq-dev] 0MQ keepalive no. we used PUSH (clients) and PULL (server) for heartbeats. it worked well, but every now and then (few to several months) the connecti

[zeromq-dev] zactor destroy sequence

2014-11-01 Thread Arnaud Loonstra
Hi all, I'm going through the zactor class to understand it better. I'm slightly confused by the destroy sequence: At line 182 of zactor.c: // Signal the actor to end and wait for the thread exit code // If the pipe isn't connected any longer, assume child thread //

Re: [zeromq-dev] 0MQ keepalive

2014-11-01 Thread Andrew Hume
no. we used PUSH (clients) and PULL (server) for heartbeats. it worked well, but every now and then (few to several months) the connection would stop working (although no errors were seen) for one of teh clients. networking sucks. On Nov 1, 2014, at 6:26 AM, Meng Zhang wrote: > > Thanks Doron f

Re: [zeromq-dev] 0MQ keepalive

2014-11-01 Thread Meng Zhang
Thanks Doron for sharing this pattern;) Does anyone in the community use the simple PUB/SUB and enable TCP keep alive to achieve what we're talking about here? Regards, Meng -Original Message- From: "Doron Somech" Sent: ‎2014/‎11/‎1 18:40 To: "ZeroMQ development list" Subject: Re: [

Re: [zeromq-dev] 0MQ keepalive

2014-11-01 Thread Doron Somech
This is what we are doing to overcome this issue: publishers are the clients and the subscribers are the servers (publishers connect and subscriber bind). Publisher publish a heartbeat message every one second, that way zeromq will recognize a disconnection and will reconnect automatically. We use

Re: [zeromq-dev] 0MQ keepalive

2014-11-01 Thread Meng Zhang
Hi, @Benjamin Thanks for your quick response. I'm aware of the way to implement the heartbeat function. I was just wondering how the TCP keep alive helps. What happened to zeromq lib when TCP Keepalive dectects a failure. Regards, Meng -Original Message- From: "Benjamin" Sent: ‎2014/

Re: [zeromq-dev] 0MQ keepalive

2014-11-01 Thread Benjamin
Hi, the standard way is the Paranoide Pirate Protocol: http://rfc.zeromq.org/spec:6 The Guide discusses this in chapter 4: http://zguide.zeromq.org/php:chapter4 For a heart-beating for publishers I think you have to define your use-case. As an example, say the client discovers that the service i