3.6. Messages

The ultimate purpose of a JMS application is to produce and to consume messages that can then be used by other software applications. JMS messages have a basic format that is simple but highly flexible, allowing you to create messages that match formats used by non-JMS applications on heterogeneous platforms.

A JMS message has three parts:

  • A header

  • Properties (optional)

  • A body (optional)

For complete documentation of message headers, properties, and bodies, see the documentation of the Message interface in Chapter 25.

3.6.1. Message Headers

A JMS message header contains a number of predefined fields that contain values that both clients and providers use to identify and to route messages. (Table 3.1 lists the JMS message header fields ...

Get Java™ Message Service API Tutorial and Reference: Messaging for the J2EE™ Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.