title: When sending XML to JMS should I use TextMessage or BytesMessage
body: <p>I have found some quite conflicting information on the web and I think that each different JMS provider may also alter the answer too.</p>
  
  <p>I'm trying to understand when sending XML into a JMS system (e.g. ActiveMQ) whether I should use a </p>
  
  <ul>
  <li><p>BytesMessage : I can guarantee that the XML is serialized correctly and the preamble will match the actual encoding.  Furthermore I can be sure that the client will be able to get the raw representation correctly.</p></li>
  <li><p>TextMessage : There are APIs in many of the queue implementations for sending XML easily.  I also understand that there are "encoding" information attached to the messages.  But I risk encoding the message (and writing it's preamble) in one format and receiving it as another.</p></li>
  </ul>
  
  <p>Does anyone have a definitive answer, or at least some reasons why you would choose one over the other? </p>