JMS Message payload

The payload for some of the JMS message types can be extracted as a whole from the message object by using the JMS API. The payload is passed as a bit stream to a broker parser. This is true for the following message types:
  • BytesMessage
  • TextMessage
  • ObjectMessage

    Additional processing is required to deal with the ObjectMessage payload because the JMS ObjectMessage payload is a serialized Java Object.

    Start of changeThe JMSInput node obtains the payload by calling getObject( ) on the message. getObject( ) returns a de-serialized object of the original class. This class definition must be made available to the JMSInput node, and you should ensure that it is accessible through the broker's Java class path. (The class path is defined in the mqsiprofile batch file, which is in the broker's executable directory; for example, on Windows, this is mqsiprofile.cmd in the install_dir/bin directory.) The JMSInput node invokes the BLOB parser, which creates the message body by using a bit stream that is created from the object.End of change

    The Java Object can be subsequently re-serialized in a JavaCompute Node or a user-defined extension, and is updated by using its method calls.

The payload for MapMessage and StreamMessage can be extracted only as individual elements and must be reformatted by the JMSInput node before it can be used to create the message body.

Related reference
JMS message structure
JMS message types
Representation of messages across the JMS Transport
JMS input message header and property data
JMS message payload and appropriate parser
Order of precedence for deriving the message domain
JMS message for output