The JMS header contains system-specific information common to all messages with JMS content, for example, the message destination, the time it was sent and so on. The body contains only application-specific data.
The header can also contain some application-specific information stored as keyword/value properties. However, not all providers allow an arbitrary amount of data to be stored in the header. It is a good idea to keep most application-specific data in the message body. Below is a list of header fields and their descriptions:
Header Type | Description |
---|---|
JMSCorrelationID |
JMSCorrelationID associates the message with some other message or application-specific ID. Usually, this value is used to determine to which message a reply is sent. |
JMSReplyTo |
JMSReplyTo indicates the JMS topic or JMS queue to which replies should be sent. |
JMSType |
The most important header value is JMSType. This is a string used to determine what kind of message is being sent. Handlers often use the JMSType value to determine how they should handle an incoming message. |
JMSPriority |
JMSPriority indicates the importance of the message from 0 to 9, where 0 is the least important and 9 is the most important. 4 indicates normal priority, and values over 5 indicate the message has a high priority. |
JMSDeliveryMode |
The JMS delivery mode can ensure the message is not lost in transition. Possible values:
Note: The mode applies only to delivery, not to storage after receipt. |
TimeToLive | Specifies the time period for which a request will remain valid (in milliseconds). If set to zero, or if no value is specified, the request will never expire. |
Send As BytesMessage | Sets the type of outgoing messages to BytesMessage. |
Add SoapAction as property |
Adds the SOAPAction and SOAPJMS_soapAction properties that have the same value as the Soap Action Method property.
|
Durable Subscription Name |
Sets a durable subscription name, the default name is durableSubscription + topic_name .
|
ClientID | Sets a client ID for the JMS connection. |
Message Selector |
You can specify message selectors in JMS request headers. When clients subscribe to topics, they can also specify message selectors to filter out messages the client does not need. You can specify message selectors only in header elements. For example, the client can specify a message selector that will display only the messages whose JMSType is |
Response headers
To examine headers of the response message, use the JMS panel:
The table below lists the header properties available in the response:
Property | Description | ||
---|---|---|---|
Associates a message with a unique identifier. You can use JMSMessageID values to identify messages in historical repositories. |
|||
Determines a destination object to which the current message is sent. Destination objects are |
|||
Gets the expiration date of the current message. After the date has expired, the message will not be sent. |
|||
Gets a boolean that indicates whether the current message is redelivered. |
|||
Associates the current message with some other message or application-specific ID. Usually this is done to determine to which message a reply is sent. |
|||
Indicates the time the current message was received. It is useful to determine the duration between the time when the message was sent and when it was received. |
|||
Indicates the JMS topic or JMS queue where replies should be addressed. |
|||
Determines what kind of message is being sent. Handlers often use the |
|||
Indicates the importance of the message from 0 to 9, where 0 is the least important and 9 is the most important. 4 indicates normal priority, and values over 5 indicate the messages have high priority. |
|||
Ensures that the message is not lost in transit
The messages can be of two types: |