Defining JMS Header attributes

In the listener map defined for a JMS listener, you can specify how JMS Header properties can be handled on the request and the reply. The protocol specific context information that can be read from or updated in the message header includes:

  • MessageID
  • CorrelationID
  • Priority, Persistence, Expiry
  • Application specific header properties that may be sent by the enterprise application or required by the enterprise application receiving the message.

Any JMS Header information that needs to be mapped from a JMS Message received by a listener needs to be specified on the listener map.
Any JMS Header information that needs to be specified on the JMS Message that is sent as a reply can be specified either in the listener map or the listener. You can specify extended attributes in the listener map to have more control over the JMS header content of messages sent to the endpoint enterprise application. The header attribute configuration in the map overrides any configuration specified on the listener.

Processing of JMS Header properties from the request

To access the JMS header configuration for the request, edit the listener map panel, select the Input tab (default), and then select the Header button. This brings up a popup panel as shown.
Using this panel you can associate listener map variables defined in the Input tab with the MessageID, CorrelationID and application specific header property values that are received in the JMS Message.

Parameter Description
Correlation ID Select a variable from the Input tab that will be set to the CorrelationId of the JMS message received by the listener. The default is to leave this field unspecified.
Message ID Select a variable from the Input tab that will be set to the MessageId of the JMS message received by the listener. The default is to leave this field unspecified.

Application Defined Properties

Use this section of the Header panel if you want to map data from user defined JMS Header properties to variables in the Input tab of the listener map. You specify the value one property at a time by selecting the Add button and entering the property information in the popup panel.

Parameter Description
Name Specify the Input tab variable that will be set to the JMS header property value.
Property Specify the key value of the enterprise application defined JMS Header property. This JMS Header property is expected to be present in the JMS message received by the listener and processed by this listener map.
Default Value The value specified in this field will be used to set the Input tab variable in case the JMS Header property identified by Property is not found in the JMS message received by the listener.

Specifying JMS Header properties on the reply

To access the JMS Header configuration for the response, edit the listener map panel, select the Output tab, and then select the Header button. This brings up a popup panel as shown.
Using this panel you can specify the following attributes and metadata of the reply JMS Message:

  • How listener map variables defined in the Output tab can be mapped to CorrelationID and application specific header property values
  • Override Expiry, Persistence, Priority settings that will override what is specified on the listener
  • Specify an alternate JMS ReplyTo queue that will override what is specified on the listener.

Parameter Description
Correlation ID Select a variable from the Output tab that will be set to the CorrelationId of the JMS Message reply message sent by the listener. The default is to leave this field unspecified.
Expiry This is a combination field and list box. If left unspecified, as indicated by Default As Listener, then the JMS reply created by this listener map will be initialized with the expiration specified on the listener. Otherwise enter a numerical value that represents the time to live for the message in seconds. You can select Unlimited from the list to indicate that the message has an infinite time-to-live.The default is Default As Listener.
Persistence This pick list can be used to specify the JMS delivery mode (persistence) of the JMS message reply sent by the listener. If left unspecified, as indicated by Default As Listener, the JMS reply message created by this map will be initialized with the Persistence specified on the listener. Choose from:
  • Persistent
  • Non-Persistent
  • Default As Listener
Priority This pick list specifies the priority of the JMS message reply defined by this listener map. Choose a value from 0 (Lowest) through 9 (Highest). If left unspecified, as indicated by Default As Listener, then this JMS message will have a priority as specified on the listener.
Reply Queue You can specify a replyTo Queue to be set in the JMS message reply defined by this listener map. If left unspecified, the replyTo Queue will not be set in the JMS reply.

Application Defined Properties

Use this section of the Extended Attributes panel if your enterprise application expects user defined JMS Header properties to be added to the JMS reply message defined by this listener map. You specify the value one property at a time by selecting the Add button and entering the property information in the popup panel.

Parameter Description
Name This field allows you to specify the content of the JMS header property. The options are:
  • An input variable whose value will be used to set the value of the JMS header property
  • $CONSTANT if you will be entering a constant value.
Property Specify the key value of the JMS Header property in this field. This JMS Header property key will be present in the JMS message defined by this listener map with a corresponding value as specified in the Name parameter.
Type This pick list specifies the data type of the JMS Header property. The data type is typically dictated by the target enterprise application consuming this JMS Message. The type information is used to call the appropriate JMS Header property setter when adding the JMS Header property to the JMS Message defined by this listener map.
Default Value Enter a text value in this field if you selected $CONSTANT in the Name field. The value entered here will be the value of the JMS Header property added to the JMS Message defined by this listener map. Enter a value appropriate for the type specified. If an error occurs when setting the JMS Header property the listener will fail the reply.
Related topics

Extended attributes for the JMS listener