WebSphere Message Brokers
File: ac04580_
Writer: Terry Cowling

Reference topic

This build: July 31, 2007 21:17:23

MQReply node

This topic describes the MQReply node.

This topic contains the following sections:

Purpose

Use the MQReply node to send a response to the originator of the input message. The MQReply node is a specialized form of the MQOutput node that puts the output message to the WebSphere MQ queue that is identified by the ReplyToQ field of the input message header. If appropriate, define the queue as a WebSphere MQ clustered queue or shared queue.

The MQReply node honors the options that are set in the Report field in the MQMD. By default (if no options are set), the MQReply node generates a new MsgId and CorrelId in the reply message. If the receiving application expects other values in these fields, ensure that the application that puts the message to the message flow input queue sets the required report options, or that you set the appropriate options within the MQMD during message processing in the message flow; for example, use a Compute node to set the Report options in the message.

You can find more information about the Report field in the WebSphere MQ Application Programming Reference.

The MQReply node is contained in the WebSphere MQ drawer of the palette, and is represented in the workbench by the following icon:

MQReply node icon

Using this node in a message flow

Look at the following sample to see how to use this node: You can view samples only when you use the information center that is integrated with the Message Brokers Toolkit.

You can use this node when you receive an order from a customer. When the order message is processed, a response is sent to the customer acknowledging receipt of the order and providing a possible date for delivery.

Configuring the MQReply node

When you have put an instance of the MQReply 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 for which you must enter a value (those that do not have a default value defined) are marked with an asterisk.

Configure the MQReply node as follows:

  1. Optional: On the Description tab, enter a short description, a long description, or both. You can also rename the node on this tab.
  2. On the Advanced tab:
    1. Select Segmentation Allowed if you want WebSphere MQ to break the message into segments in the queue manager, when appropriate. You must also set MQMF_SEGMENTATION_ALLOWED in the MsgFlags field in the MQMD for segmentation to occur.

      More information about the options to which this property maps is available in the WebSphere MQ Application Programming Reference.

    2. Select the Persistence Mode that you want for the output message.
      • If you select Automatic (the default), the persistence is as specified in the incoming message.
      • If you select Yes, the message is put persistently.
      • If you select No, the message is put non-persistently.
      • If you select As Defined for Queue, the message persistence is set as defined in the WebSphere MQ queue.
    3. Select the Transaction Mode that you want for the output message.
      • If you select Automatic (the default), the message transactionality is derived from how it was specified at the MQInput node.
      • If you select Yes, the message is put transactionally.
      • If you select No, the message is put non-transactionally.
  3. On the Validation tab, set the validation properties, see Validation properties. If a message is propagated to the Failure terminal of the node, it is not validated.

    For more details, see Validating messages.

The reply message is put (using MQPUT) to the queue named in the input message MQMD as the ReplyTo queue. You cannot change this destination.

Connecting the output terminals to another node

Connect the Out or Failure terminal of this node to another node in this message flow to process the message further, process errors, or send the message to an additional destination.

If you connect an output terminal to another node in the message flow, information about the destination to which the message has been put is added to the LocalEnvironment that is associated with the message. The following values are written in WrittenDestination within the LocalEnvironment tree structure:
  • Queue name
  • Queue manager name
  • Message reply identifier (this is set to the same value as message ID)
  • Message ID (from the MQMD)
  • Correlation ID (from the MQMD)

If you do not connect one of these output terminals, the LocalEnvironment tree is unchanged.

If you use aggregation in your message flows, you must use these output terminals.

Configuring for coordinated transactions

When you define an MQReply node, the option that you select for the Transaction Mode property defines whether the message is written under syncpoint:
  • If you select Yes, the message is written under syncpoint (that is, within a WebSphere MQ unit of work).
  • If you select Automatic (the default), the message is written under syncpoint if the incoming input message is marked as persistent.
  • If you select No, the message is not written under syncpoint.
Another property of the MQReply node, Persistence Mode, defines whether the output message is marked as persistent when it is put to the output queue:
  • If you select Yes, the message is marked as persistent.
  • If you select Automatic (the default), the message persistence is determined by the properties of the incoming message, as set in the MQMD (the WebSphere MQ message descriptor).
  • If you select No, the message is not marked as persistent.
  • If you select As Defined for Queue, the message persistence is set as defined in the WebSphere MQ queue; the MQReply node specifies the MQPER_PERSISTENCE_AS_Q_DEF option in the MQMD.

Terminals and properties

The MQReply node terminals are described in the following table.

Terminal Description
In The input terminal that accepts a message for processing by the node.
Failure The output terminal to which the message is routed if a failure is detected when the message is put to the output queue.
Out The output terminal to which the message is routed if it has been successfully put to the output queue, and if further processing is required within this message flow.

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 MQReply node Description properties 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 MQReply node Advanced properties are described in the following table.

Property M C Default Description
Segmentation Allowed Yes No Cleared If you select this check box, when appropriate, WebSphere MQ breaks the message into segments in the queue manager.
Persistence Mode Yes No Automatic This property controls whether the message is put persistently. Valid values are Automatic, Yes, No, and As Defined for Queue.
Transaction Mode Yes No Automatic This property controls whether the message is put transactionally. Valid values are Automatic, Yes, and No.

The Validation properties of the MQReply node are described in the following table.

For a full description of these properties, see Validation properties.

Property M C Default Description
Validate Yes Yes Inherit This property controls whether validation takes place. Valid values are None, Content and Value, Content, and Inherit.
Failure Action Yes 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, and Exception List.

The MQReply node also has the following properties that you cannot access or modify through the workbench interface. However, these values are used by the broker when the message is processed in the message flow.

Property Description
Queue Manager Name The name of the WebSphere MQ queue manager to which the output queue, which is identified in Queue Name, is defined. This name is retrieved from the ReplyTo field of the MQMD of the input message.
Queue Name The name of the WebSphere MQ queue to which the output message is put. This name is retrieved from the ReplyTo field of the MQMD of the input message.
Destination This property always has the value reply.
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:17:23

ac04580_ This topic's URL is: