NonStop JMS C++ API Programmer's Guide

Using the NSJMS C++ APIs
NonStop Server for Java Message Service C++ API Programmer’s Guide526459-002
5-4
Populating a Message with Data
Message class
The Message class is the base class of all message subclasses. The Message class
defines the JMS header and property methods used for all message types. A JMS
Message is made up of these components:
Message Header
Message Properties
Message Body
Message Header
All messages support the same set of header fields. Header fields contain values used
by both clients and providers to identify and route messages. Header fields are never
in a read-only mode. Most JMS headers are set automatically by the NSJMS C++ APIs
software with the exception of JMSCorrelationID and JMSReplyTo as shown in
this table:
Using the client to set the JMSReplyTo header is shown in this code fragment:
// Set JMS ReplyTo header
pMsg->setJMSReplyTo("Q1");
Message Properties
A Message object contains a built-in facility for supporting application-defined property
values. In effect, this facility provides a mechanism for adding application-specific
header fields to a message. Property values can be boolean, byte, short, int, long,
float, double, and String. Property values are set prior to sending a message. When a
Header Fields Set By
JMSDestination
NSJMS C++ APIs
Software
JMSDeliveryMode NSJMS C++ APIs
Software
JMSExpiration
NSJMS C++ APIs
Software
JMSPriority NSJMS C++ APIs
Software
JMSMessageID NSJMS C++ APIs
Software
JMSTimestamp NSJMS C++ APIs
Software
JMSCorrelationID Client
JMSReplyTo Client
JMSType NSJMS C++ APIs
Software