The actual content of a message is contained in the message body. JMS defines six classes (or types) of message, each with a different body format:
A text message (interface TextMessage) contains a Java string.
A stream message (interface StreamMessage) contains a stream of Java primitive values, written and read sequentially.
A map message (interface MapMessage) contains a set of name-value pairs, where each name is a string and each value is a Java primitive value. The order of the entries is undefined; they can be accessed randomly by name or enumerated sequentially.
An object message (interface ObjectMessage) contains a serialized Java object (which may in turn be a collection of other objects).
A bytes message (interface BytesMessage) contains a stream of uninterpreted bytes.
A null message (interface Message) consists of a header and properties only, with no message body.
Each of these is a subinterface of the generic Message interface, extended with additional methods specific to the particular message type.