Extended attributes for the JMS listener

When you click Extended Attributes from the Listener window for a JMS listener, two tabs appear.

JMS Header tab

Using the JMS Header tab, you will be able to override some of the default WebSphere SIB JMS header attributes. 

The Expiration, Priority and Delivery Mode parameters have a default option that you can select if you do not want to override the value specified in the request. For example, if you want to override Priority, but leave the DeliveryMode and Expiration as defaults, then you would only specify a value for Priority and leave the other two parameters as default selections.

When choosing to specify extended attributes, there is an order of precedence by which the value is set in the response. The listener will:

  • Default to the header value set in the request.
  • Override it with a header value that is specified in the listener definition Extended Attributes JMS Header Properties window.
  • Override this with the value specified in the Listener Map definition (Outbound Message Header).

For example, if a listener JMS priority has been specified as 5 in the request, 6 in the listener JMS Header Properties, and 3 in the listener map definition (Outbound Message Header), then the reply will be sent with a priority of 3.

JMS Selector Spec tab

Using the JMS Selector Spec tab, gives you the ability to construct a message selector. When a selector is specified and the JMS listener becomes active, only messages with header properties matching the selector criteria will be removed from the JMS server queue for processing. Messages that do not match the selector criteria will remain on the server queue.

The following demonstrates the construction of a message selector. It comprises an identifier (for this example, tag and year). .

Identifier This is the name of the message property that the JMS listener will use as the selector. For this example, tag and year.
mathematical operator If the selector needs to be an expression, use a mathematical operator (=, !=, > , >=, <, <= ) to relate the operator to either a type or constant value. Each of these operators can be combined with other operators using an And or Or.
Type The Type drop-down list lets you specify the data type of the selector.
Value A value that relates to the selector property. For this example, two strings, complete and 2009.

As each message selector is constructed, click Add.

The identifier is followed by an operator and literal string.

Related topics

Creating a JMS listener