IBM Integration Bus, Version 9.0.0.8 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

JMSReply node

Use the JMSReply node to send messages to JMS destinations.

This topic contains the following sections:

Purpose

The JMSReply node has a similar function to the JMSOutput node, but the JMSReply node sends JMS messages only to the reply destination that is supplied in the JMSReplyTo header field of the JMS message tree. Use the JMSReply node when you want to treat a JMS message that is produced from a message flow as a reply to a JMS input message, and where you have no other routing requirements.

The JMSReply node is contained in the JMS drawer of the palette, and is represented in the IBM® Integration Toolkit by the following icon:

JMSReply node icon

Using the JMSReply node in a message flow

Consider a situation in which you create a message flow in which a JMSInput node message obtains point-to-point messages from a JMS destination called MyJMSInputQueue. The message flow updates a database using the contents of the message, then replies to a JMS destination called MyJMSReplyQueue, which is set by the generating application in the JMSReplyTo header of the input message.

In a similar scenario for the publish/subscribe message model, a JMSInput node subscribes to TopicA, and the JMSReply node publishes on the TopicB destination, which was retrieved from the JMSReplyTo header of the input message.

Calling an output message callback function

The cciOutputMessageCallback function can be registered as a callback and called whenever a message is sent by a JMSReply node. See cciOutputMessageCallback.

If the user exit state is active, the cciOutputMessageCallback function is called for every output message that is sent successfully from a JMSReply node where the callback is registered.

If the node provides WrittenDestination information in the LocalEnvironment tree, the callback is called after this information is created. See Using LocalEnvironment variables with JMSOutput and JMSReply nodes.

Working with the JMS message ID

The JMS message ID is generated by the JMS provider when a message is sent by the JMSReply node. You cannot set the message ID in the message flow, but you can use one of the following methods to obtain the generated ID after the message has been sent:
  • Connect a Compute node to the Out terminal.

    Connect a Compute node to the Out terminal of a JMSReply node and interrogate the WrittenDestination List. For more information, see Viewing the logical message tree in trace output.

    An entry for a JMSReply node has the following format:
    WrittenDestination = (
       JMS = (
          DestinationData = (
            destinationName = 'queue://jmsQueue1'
            initialContext = 'com.sun.jndi.fscontext.RefFSContextFactory'
            JMSMessageID = ID:414d512054657374514d2020202020206ab98b4520017a02'
            JMSCorrelationID = 'ABCDEFGHIJKLMNOPQRSTUVW'
      )
     )
    )
  • Configure a user exit to process an output message callback event. For more information, see Exploiting user exits.

Terminals and properties

When you have put an instance of the JMSReply node into a message flow, you can configure it; see Configuring a message flow node. The properties of the node are displayed in the Properties view. All mandatory properties that do not have a default value defined are marked with an asterisk.

The terminals of the JMSReply node are described in the following table.

Terminal Description
Failure The output terminal to which the message is routed if an error occurs. Even if the Validation property is set, messages that are propagated to this terminal are not validated.
Out The output terminal to which the message is routed if it is successfully retrieved from the WebSphere® MQ queue.

The following tables describe the node properties. The column headed M indicates whether the property is mandatory (marked with an asterisk if you must enter a value when no default is defined), the column headed C indicates whether the property is configurable (you can change the value when you add the message flow to the BAR file to deploy it).

The Description properties of the JMSReply node are described in the following table.
Property M C Default Description
Node name No No The node type The name of the node.
Short Description No No   A brief description of the node.
Long Description No No   Text that describes the purpose of the node in the message flow.
The Basic properties of the JMSReply node are described in the following table.
Property M C Default Description mqsiapplybaroverride command property
Send to destination list in local environment No Yes Cleared When you have built a list of JMS destinations in the local environment, select this check box to use the destination list. If you do not select this check box, the node uses the configured JMS destination. If you select this check box but you have not built a list of JMS destinations in the local environment, the node uses the configured JMS destination. useDistList
The JMS Connection properties of the JMSReply node are described in the following table.
Property M C Default Description mqsiapplybaroverride command property
JMS provider name Yes No WebSphere MQ Select a JMS vendor name from the list, or enter a name of your choice. When you select a name from the list, the Initial Context Factory property is updated automatically with the relevant Java™ class. If you enter your own JMS provider name, you must also enter a value for the Initial Context Factory. The default value is WebSphere MQ.

Alternatively, you can specify the JMSProviders configurable service.

 
Initial Context Factory No Yes
com.sun.jndi.fscontext. 
RefFSContextFactory
This property is the starting point for a JNDI namespace. A JMS application uses the initial context to obtain and look up the connection factory and queue or topic objects for the JMS provider. If you select a JMS provider name from the list in JMS provider name, the Initial Context Factory property is updated automatically with the relevant Java class. If you enter your own JMS provider name, you must also enter a value for the Initial Context Factory.
The default value of
com.sun.jndi.fscontext.
RefFSContextFactory
defines the file-based initial context factory for the WebSphere MQ JMS provider.

If the node is set to use your own JMS Provider, and the corresponding Configurable services property of the mqsichangeproperties definition has the InitialContextFactory attribute set, this overrides the setting on the node.

initialContextFactory
Location JNDI Bindings No Yes   This property specifies either the file system path or the LDAP location for the bindings file. The bindings file contains definitions for the JNDI-administered objects that are used by the JMSReply node.

When you enter a value for Location JNDI Bindings, ensure that it complies with the following instructions:

  • Construct the bindings file before you deploy a message flow that contains a JMSReply node.
  • Do not include the file name of the bindings file in this field.
  • If you have specified an LDAP location that requires authentication, configure both the LDAP principal (userid) and LDAP credentials (password) separately. These values are configured at broker level. For information about configuring these values, refer to the mqsicreatebroker and mqsichangebroker commands.
  • The string value must include a supported URL prefix that has a URL handler that is available on the class path.

For information about constructing the JNDI-administered objects bindings file, refer to the documentation that is supplied with the JMS provider.

If the node is set to use your own JMS Provider, and the corresponding Configurable services property of the mqsichangeproperties definition has the jndiBindingsLocation attribute set, this overrides the setting on the node.

locationJndiBindings
Connection Factory Name No Yes   The name of the connection factory that is used by the JMSReply node to create a connection to the JMS provider. This name must already exist in the bindings file. connectionFactoryName
The Advanced properties of the JMSReply node are described in the following table.
Property M C Default Description
New Correlation ID No Yes Cleared If the JMSReply node is required to generate a new Correlation ID for the message, select the check box. The check box is cleared by default; if you leave the check box cleared, the Correlation ID of the output message is taken from the JMSCorrelationID field in the JMSTransport_Header_Values section of the message tree.
Transaction Mode No No No
This property controls whether the message is received under a JMS transaction. Valid values are Yes and No.
  • Select No to receive the message using a non-transactional JMS session.
  • Select Yes to receive the message using a transactional JMS session. The JMS transaction can be either local or XA coordinated. To use an XA coordinated transaction, using an XA JMS session, you must also select the message flow property Coordinated Transaction in the BAR file properties. See Configuring for coordinated JMS transactions.
The value set for Transaction mode on the JMSReply node is inherited by nodes downstream in the message flow that have their Transaction mode set to Automatic. Other resources that perform work within the message flow, such as DB2® or WebSphere MQ, use transactions regardless of the node's Transaction mode setting, and commit their transaction after the message is processed.
Delivery Mode No Yes Automatic This property controls the persistence mode that a JMS provider uses for a message. Valid values are:
  • Automatic: the mode from the input message is inherited
  • Persistent: the message survives if the JMS provider has a system failure
  • Non-persistent: the message is lost if the JMS provider has a system failure
Message Expiration (ms) Yes Yes 0 This property controls the length of time, in milliseconds, for which the JMS provider keeps the output JMS message. The default value, 0, is used to indicate that the message must not expire.
Select Inherit from header or enter an integer that represents a number of milliseconds. If you select Inherit from header, the property inherits the value of the JMSExpiry field in the JMS message, which is found at the following location:
OutputRoot.JMSTransport.Transport_Folders.Header_Values.JMSExpiration
Message Priority No Yes 4 This property assigns relative importance to the message and it can be used for message selection by a receiving JMS client application or a JMSReply node.

Select a value between 0 (lowest priority) and 9 (highest priority) or select Inherit from header.

The default value is 4, which indicates medium priority. Priorities in the range 0 to 4 relate to normal delivery. Priorities in the range 5 to 9 relate to graduations of expedited delivery. If you select Inherit from header, the property inherits the value of the JMSPriority field in the JMS message, which is found at the following location:
OutputRoot.JMSTransport.Transport_Folders.Header_Values.JMSPriority
Message type No Yes TextMessage This property controls the class of the JMS output message. The default value is TextMessage. Valid values are:
  • TextMessage
  • BytesMessage
  • MapMessage
  • StreamMessage
  • ObjectMessage
  • Base JMS message with no payload
If you do not set this property, the node assumes the output type from the metadata PayLoadType field in the JMS message tree.
The Validation properties of the JMSReply node are described in the following table. Refer to Validation properties for a full description of these properties.
Property M C Default Description mqsiapplybaroverride command property
Validate No Yes Inherit This property controls whether validation takes place. Valid values are:
  • None
  • Content and Value
  • Content
  • Inherit
If a message is propagated to the Failure terminal of the node, it is not validated.
validateMaster
Failure Action No No Exception This property controls what happens if validation fails. You can set this property only if you set Validate to Content or Content and Value. Valid values are:
  • User Trace
  • Local Error Log
  • Exception (default value)
  • Exception List
 
The Monitoring properties of the node are described in the following table.
Property M C Default Description
Events No No None Events that you have defined for the node are displayed on this tab. By default, no monitoring events are defined on any node in a message flow. Use Add, Edit, and Delete to create, change or delete monitoring events for the node; see Configuring monitoring event sources using monitoring properties for details.

You can enable and disable events that are shown here by selecting or clearing the Enabled check box.


ac37130_.htm | Last updated Friday, 21 July 2017