JMS supports five message body types, shown below roughly in the order of complexity:
Bytes: Contains a set of bytes in a format determined by the application
Text: Is a simple java.lang.String
Stream: Contains a stream of Java primitive values
Map: Contains a set of name-and-value pairs
Object: Contains a Java serialized object
While, in general, the message type is dictated by the needs of an application, the more complicated types (map and object) carry a performance cost — the expense of serializing and deserializing the data. The performance cost depends on how simple or how complicated the data is.