title: Message versioning in RabbitMQ / AMQP?
body: <p>What is the recommended way to deal with message versioning? The main schools of thought appear to be:</p>
  
  <ol>
  <li>Always create a new message class as the message structure changes</li>
  <li>Never use (pure) serialized objects as a message. Always use some kind of version header field and a byte stream body field. In this way, the receiver can always accept the message and check the version number before attempting to read the message body.</li>
  <li>Never use binary serialized objects as a message. Instead, use a textual form such as JSON. In this way, the receiver can always accept the message, check the version number, and then (when possible) understand the message body.</li>
  </ol>
  
  <p>As I want to keep my messages compact I am considering using <a href="https://developers.google.com/protocol-buffers/" rel="nofollow noreferrer">Google Protocol Buffers</a> which would allow me to satisfy both 2 &amp; 3. </p>
  
  <p>However I am interested in real world experiences and advice on how to handle versioning of messages as their structure changes?</p>