title: How can I set a timeout for a zmq request in Node.js?
body: <p>I have written the following code that is waiting for a response. How can register a timeout callback if I don't get a response after 5 seconds? </p>
  
  <pre><code>var zmqRequest = zmq.socket('req');
  zmqRequest.connect('tcp://localhost:8188');
  
  zmqRequest.send(request.params.fileGuid);
  console.log('request sent ' + request.params.fileGuid);
  
  zmqRequest.on('message', function(msg){ // report back to the user... }); 
  </code></pre>