Oracle GlassFish Message Queue 4.4.2 Developer's Guide for Java Clients

Retrieving Message Header Fields

The standard JMS message header fields are described in Table 2–4. Table 2–18 shows the methods provided by the JMS Message interface for retrieving the values of these fields: for instance, you can obtain a message’s reply destination with the statement

Destination  replyDest = inMsg.getJMSReplyTo();
Table 2–18 Message Header Retrieval Methods

Name 

Description 

getJMSMessageID

Get message identifier 

getJMSDestination

Get destination 

getJMSReplyTo

Get reply destination 

getJMSCorrelationID

Get correlation identifier as string 

getJMSCorrelationIDAsBytes

Get correlation identifier as byte array 

getJMSDeliveryMode

Get delivery mode 

getJMSPriority

Get priority level 

getJMSTimestamp

Get time stamp 

getJMSExpiration

Get expiration time 

getJMSType

Get message type 

getJMSRedelivered

Get redelivered flag