Use the MQOutput node to send messages to clients that connect to the broker using the WebSphere® MQ Enterprise Transport and that use the MQI and AMI application programming interfaces.
This topic contains the following sections:
The MQOutput node delivers an output message from a message flow to a WebSphere MQ queue. The node uses MQPUT to put the message to the destination queue that you specify.
If appropriate, define the queue as a WebSphere MQ clustered queue or shared queue. When you use a WebSphere MQ clustered queue, leave the Queue Manager Name empty.
You can configure the MQOutput node to put a message to a specific WebSphere MQ queue that is defined on any queue manager that is accessible by the broker's queue manager.
Set other properties to control the way in which messages are sent, by causing appropriate MQPUT options to be set; for example, you can request that a message is processed under transaction control. You can also specify that WebSphere MQ can, if appropriate, break the message into segments in the queue manager.
If you create a message flow to use as a subflow, you cannot use a standard output node; use an instance of the Output node to create an Out terminal for the subflow through which to propagate the message.
If you do not want your message flow to send messages to a WebSphere MQ queue, choose another supported output node.
The MQOutput node is contained in the WebSphere MQ drawer of the palette, and is represented in the workbench by the following icon:
For an example of how to use this node, assume that you have written a publishing application that publishes stock updates on a regular basis. The application sends the messages to the broker on an MQInput node, and the message flow makes the publications available to multiple subscribers through a Publication node. You include an MQOutput node to send the message to an application that records each price change that occurs.
When you have put an instance of the MQOutput 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. To display the properties of the node either double-click the node, or right-click the node and click Properties.
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 MQOutput node.
When you select this option, the MQOutputnode constructs a WebSphere MQ reply message. See Contents of the WebSphere MQ reply message for further information on the settings used by the MQOutput node and the Root.MQMD folder in this situation.
Clear the check box if you do not want to generate a new ID. A new message ID is still generated if you select Request on the Request tab.
More information about the options to which this property maps is available in the Application Programming Reference section of the WebSphere MQ Version 6 information center online, or the Version 5.3 book on the WebSphere MQ library Web page.
More information about the options to which this property maps is available in the Application Programming Reference section of the WebSphere MQ Version 6 information center online, or the Version 5.3 book on the WebSphere MQ library Web page.
More information about the options to which this property maps is available in the Application Programming Reference section of the WebSphere MQ Version 6 information center online, or the Version 5.3 book on the WebSphere MQ library Web page.
More information about the options to which these properties map is available in the Application Programming Reference section of the WebSphere MQ Version 6 information center online, or the Version 5.3 book on the WebSphere MQ library Web page.
A new message identifier is generated even if the New Message ID check box is not selected on the Advanced tab.
Connect the In terminal to the node from which outbound messages bound are routed.
Connect the Out or Failure terminal of this node to another node in this message flow to send the message to an additional destination.
MQMD.Report = 0; MQMD.PutApplType = MQAT_BROKER; MQMD.PutDate = Taken from current Timestamp MQMD.PutTime = Taken from current Timestamp MQMD.PutApplName = MsgTree.MQMD.ReplyToQMgr (first 28 chars)
MQMD.Version MQMD.Format MQMD.Priority MQMD.Persistence MQMD.Expiry MQMD.Encoding MQMD.CodedCharSetId MQMD.GroupId MQMD.MsgSeqNumber MQMD.Offset MQMD.MsgFlags MQMD.OriginalLength
IF MsgTree.MQMD.MsgType = MQMT_REQUEST THEN MQMD.MsgType = MQMT_REPLY; IF Nodes Message Context is Default, PassAll or PassIdentity THEN MQMD.UserIdentifer = MsgTree.MQMD.UserIdentifier; IF MsgTree.MQMD.Report contains MQRO_PASS_CORREL_ID THEN MQMD.CorrelId = MsgTree.MQMD.CorrelId; ELSE MQMD.CorrelId = MsgTree.MQMD.MsgId; IF MsgTree.MQMD.Report contains MQRO_PASS_MSG_ID THEN MQMD.MsgId = MsgTree.MQMD.MsgId; ELSE MQMD.MsgId = MQMI_NONE;
When the output MQMD structure has been constructed, the Message Context on the MQOutput node is ignored, and the behavior is as set All.
The values that are overridden, are done only in the output MQMD structure; no updates are made to the MQMD folder in the message tree.
The MQOutput 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 MQOutput node Description properties are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Node name | No | No | The node type, MQOutput | 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 MQOutput node Basic properties are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Queue Manager Name | No | Yes | The name of the WebSphere MQ queue manager to which the output queue, which is specified in Queue Name, is defined. | |
Queue Name | No | Yes | The name of the WebSphere MQ output queue to which this node puts messages (using MQPUT). |
The MQOutput node Advanced properties are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Destination Mode | Yes | No | Queue Name | The queues to which the output message is sent. Valid values are , Reply To Queue, and Queue Name. |
Transaction Mode | Yes | No | Automatic | This property controls whether the message is put transactionally. Valid values are Automatic, Yes, and No. |
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. |
New Message ID | Yes | No | Cleared | If you select this check box, WebSphere MQ generates a new message identifier to replace the contents of the MsgId field in the MQMD. |
New Correlation ID | Yes | No | Cleared | If you select this check box, WebSphere MQ generates a new correlation identifier to replace the contents of the CorrelId field in the MQMD. |
Segmentation Allowed | Yes | No | Cleared | If you select this check box, WebSphere MQ breaks the message into segments in the queue manager. |
Message Context | Yes | No | Pass All | This property controls how origin context is handled. Valid values are Pass All, Pass Identity, Set All, Set Identity, and Default. |
Alternate User Authority | Yes | No | Cleared | If you select this check box, alternate authority is used when the output message is put. |
The MQOutput node Request properties are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Request | Yes | No | Cleared | If you select the check box, each output message is generated as a request message. |
Reply-to Queue Manager | No | Yes | The name of the WebSphere MQ queue manager to which the output queue, which is specified in Reply-to Queue, is defined. | |
Reply-to Queue | No | Yes | The name of the WebSphere MQ queue to which to put a reply to this request. |