The JMS API defines five types of message bodies:
--------------------------------------------------------------------------------------------------------------- ----
Stream-The message body of the Streammessage object contains the Java programming language primitive value stream ("Java basic type"). Populate and read sequentially.
Map-The message body of the Mapmessage object contains a set of name-value pairs, where the name is a String object and the value is the Java base type. These entries can be accessed sequentially or randomly by name. The order of the entries is indeterminate.
Text-The message body of the TextMessage object contains the Java.lang.String object. This message type can be used to transport plain text messages and XML messages.
Object-The message body of the ObjectMessage object contains the Serializable Java object.
Byte (bytes)-The message body of the Bytesmessage object contains an unexplained stream of bytes. This message type can literally encode the body to match the existing message format. In most cases, you can use other body types that are easier to use. Although the JMS API allows message properties to be used for byte messages, they are generally not used because the containing attribute may affect the format.