IBM Integration Bus, Version 9.0.0.8 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

JMS message structure

JMS messages have a defined structure that includes headers and payloads.

The following figure depicts the JMS message structure:

This picture depicts the parts that comprise a JMS message; header, properties, and payload.

Header

A header must be present in every JMS message, and it is assigned automatically. Most of the values in the header are set by the JMS provider when the message is put to a JMS destination. Some values can be declared by the JMS client when it creates a JMS session, or when it creates the message consumer or producer; for example, JMSDeliveryMode, JMSExpiration, JMSReplyTo, and JMSCorrelationID are created when the JMS client creates a JMS session or creates the message consumer or producer.

The data elements of each header comprise name-value pairs and they can be any of the Java™ following types: Boolean, byte, short, char, long, int, float, double, string, or byte[].

Properties

The properties are optional, and can be divided into the following subsections:

The picture shows the three different sections of the properties part of a JMS message.
  • Application-related properties

    A Java application can assign application-related properties, which are set before the message is delivered. The property names of the application are meaningful only to the sending and receiving applications.

  • Provider-related properties

    Every JMS provider can define proprietary properties that can be set either by the client or automatically by the provider. Provider-related properties are prefixed with JMS_ followed by the vendor name and the specific property name. For example, the WebSphere® MQ JMS client sets the provider property to be JMS_IBM_MsgType.

  • Standard properties

    These properties are set by the JMS provider when a message is sent. The JMS provider vendor can choose to not support any standard properties, to support some standard properties, or to support all standard properties. Standard property names start with JMSX; for example: JMSXUserid or JMSXDeliveryCount.

The properties are handled as name-value pairs, and they can be any of the following Java types: Boolean, byte, short, char, long, int, float, double, string, or byte[].

Payload

The payload type defines the JMS message. It can be one of the six JMS message types that are described in JMS message types.

JMS does not define a wire format. The Java Message Service Specification, version 1.1 describes the physical representation of how a message is structured.


ac24863_.htm | Last updated Friday, 21 July 2017