title: To multipart or not to multipart in ZeroMQ
body: <p>I am designing a server application that will talk ZeroMQ. Without going into the nitty gritty details, the server will store and serve (from query requests) <code>(eventid, eventstring)</code> tuples.</p>
  
  <p>My questions concerns design of the wire protocol. I would like to send my tuple from one end to another. I see two options:</p>
  
  <ul>
  <li>Serialize my tuple (using protobuf or whatever) and send it as a single message.</li>
  <li>Send my tuple as a multipart message; first part contains eventid and second contains eventstring.</li>
  </ul>
  
  <p><strong>Are any of these two options preferable over the other?</strong> Reading the <a href="http://zguide.zeromq.org/page%3aall" rel="noreferrer">The ZeroMQ Guide</a>, there's a <a href="http://zguide.zeromq.org/page%3aall#toc45" rel="noreferrer">chapter on Advanced Request-Reply patterns</a> that uses multipart message envelopes heavily. Does this mean that I, as a user, should try to stick to single message to enable more advanced message patterns in the future?</p>