Anatomy of JMS Messages

JMS unifies the content format and structure among various messaging products. It also supports messages containing Java objects. In this regard, it's similar to RMI except that the Java objects are exchanged asynchronously. JMS supports messages containing XML data as well. As shown in Figure 13.6, all JMS messages are composed of the following parts:

  • Header: All message types support the same set of header fields, which contain values used to identify and route messages.

  • Properties (optional): These are optional header fields added to a message. These properties can be user-defined, JMS standard, or JMS provider-specific.

  • Body (optional): This indicates the type of message content used. The message body is usually called ...

Get Sams Teach Yourself EJB in 21 Days now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.