title: ZeroMQ Pub/Sub on Unreliable Connection
body: <p>I've implemented a simple ZeroMQ Pub/Sub architecture using zmq 4.0.4.  Everything works great, sub's receive messages from pub's.</p>
  
  <p>All is great and I rejoiced with many beer.</p>
  
  <p>HOWEVER .. 24 hours after keeping having the sub &amp; pub sit idle over an unreliable network connection the sub wasn't able to receive any messages from the pub.  I was able to reproduce the issue by blocking the sub's connection port with the pub temporarily after connection with the pub.  Not only did the sub miss all messages during the time behind the firewall (expected due to the nature of pub/sub) but ALSO it failed to receive ANY messages from pub after that.</p>
  
  <p>A similar (but old) question was posted that actually had the sub throw an exception when this happened.  But appeared to be a bug that was fixed.  <a href="https://stackoverflow.com/questions/8333630/zmq-pub-sub-program-failure-when-losing-network-connectivity">ZMQ Pub-Sub Program Failure When Losing Network Connectivity</a></p>
  
  <p><strong>Short of implementing a heartbeat to determine if the connection is severed is there any way for a sub to auto-reconnect when the connection is severed with a pub?</strong></p>