title: ZeroMQ knows which go routine a request came from
body: <p>I am trying to figure out if i have two routines calling the same zeromq socket if when the return from socket.recv() on routine1 returns.. the socket will know to return to routine1 (ditto for routine2, ... routinen).</p>
  
  <p>Hence... using a messaging bus with request/response semantics, what is the best pattern to approach this in go?</p>
  
  <p>If it helps.. think about the simple pirate pattern and implementing an RPC style call set in that pattern with zeromq. </p>
  
  <pre><code>Socket; //zeromq socket
  //routine 1
  socket.send(data) // do i need some identifier here for this routine?
  socket.recv() // wait until i get a response from that send
  //routine 2 
  socket.send(data)
  socket.recv()
  </code></pre>
  
  <p>so in this case i have no idea if the response from routine1 or routine2 will come back first. How can i make sure that when i get a response to socket... i can notify the correct routines' recv() function.</p>
  
  <p>Thanks!</p>