See information about the latest product version
MQOutput node
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:
Purpose
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 or queues 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 queue manager for the broker, or to the destinations identified in the local environment that is associated with the message.
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 checks for the presence of an MQMD (WebSphere MQ message descriptor) header in the message tree. If no MQMD header is present, the MQOutput node creates one in the message tree, and populates it with MQMD default properties. If an MQMD header is found, the MQOutput node checks that it is an WebSphere MQ type header; if it is not, the Message Context property is set to Default. The MQOutput node treats any other transport headers in the message tree as data. If such headers are not required as part of the message body, use a transformation node to remove them from the message tree before the MQOutput node. If the message tree is sourced from JMS, you can use a JMSMQTransform node to construct a message tree compatible with MQ. For further details, see JMS message transformation.
The MQOutput node is contained in the WebSphere MQ drawer of the palette, and is represented in the WebSphere Message Broker Toolkit by the following icon:

Using this node in a message flow
Look at the following samples to see how to use this node:
- Pager
- Airline Reservations
- Error Handler
- Aggregation
- Large Messaging
- Message Routing
- Timeout Processing
- Video Rental
- XSL Transform
You can view information about samples only when you use the information center that is integrated with the WebSphere Message Broker Toolkit or the online information center. You can run samples only when you use the information center that is integrated with the WebSphere Message Broker Toolkit.
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 configure a Compute node to create a new output message whenever one particular stock is changed, and connect this node to an MQOutput node to record each price change for this stock.
Working with WrittenDestination data
WrittenDestination = (
MQ = (
z`DestinationData = (
queueName = 'OUT'
queueManagerName = 'MYQUEUEMANAGER'
replyIdentifier = X'4d...2e'
msgId = X'3c...2c'
correlId = X'2a...00'
GroupId = X'3a...00'
)
)
)
Connecting the terminals
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 process the message further, process errors, or send the message to an additional destination.
If you use aggregation in your message flows, you must use the output terminals.
Contents of the WebSphere MQ reply message
- Values of the following fields in MQMD are set, irrespective of
the settings you make:
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)
- Values of the following fields are set from the values in the Root.MQMD folder:
MQMD.Version MQMD.Format MQMD.Priority MQMD.Persistence MQMD.Expiry MQMD.Encoding MQMD.CodedCharSetId MQMD.GroupId MQMD.MsgSeqNumber MQMD.Offset MQMD.MsgFlags MQMD.OriginalLength
- Following values in MQMD are set conditionally, based on values
in the MQOutput node and
the Root.MQMD folder:
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;
- Value of the MQMD.Persistence field is set based on the Persistence mode on the MQOutput node.
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.
Configuring for coordinated transactions
- If you select Yes, the message is written under sync point (that is, within a WebSphere MQ unit of work).
- If you select Automatic (the default), the message is written under sync point if the incoming input message is marked as persistent.
- If you select No, the message is not written under sync point.
- If you select Yes, the message is marked as persistent.
- If you select Automatic (the default), the message persistence is determined from the properties of the incoming message, as set in the MQMD.
- 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 by the MQOutput node specifying the MQPER_PERSISTENCE_AS_Q_DEF option in the MQMD.
Terminals and properties
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.
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. |
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 for deployment).
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 | mqsiapplybaroverride command property |
---|---|---|---|---|---|
Queue Manager Name | No | Yes | Enter the name of the WebSphere MQ queue manager to which this
output queue (which is specified by the Queue
Name property) is defined. The Queue Manager Name property is only needed if the queue specified is defined on another queue manager or is a cluster queue. If it is a cluster queue, then Queue Manager Name can optionally be specified if you want to be prescriptive about which queue manager receives the message. If the queue is defined on a remote queue manager, the Queue Manager Name must be specified and it must match the transmission queue defined on the broker's local queue manager, for that remote queue manager. |
queueManagerName | |
Queue Name | No | Yes | To send the output message to a single destination
queue that is defined by this node, enter the name of the WebSphere MQ output queue to which the message
flow sends messages. If you set the Destination Mode property to Queue Name, you must specify a value for the Queue Name property. If you set Destination Mode to another value, this property is ignored. |
queueName |
The MQOutput node Advanced properties are described in the following table. These properties define the transactional control for the message and the way in which the message is put to the queue. Many of these properties map to options on the MQPUT call.
Property | M | C | Default | Description |
---|---|---|---|---|
Destination Mode | Yes | No | Queue Name | The queues to which the output message is sent.
|
Transaction Mode | Yes | No | Automatic | This property controls whether the message is
put transactionally.
|
Persistence Mode | Yes | No | Automatic | This property controls whether the message is
put persistently.
|
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. This property maps to the MQPMO_NEW_MSG_ID option of
the MQPMO of the MQI. Clear the check box if you do not want to generate
a new ID. A new message ID is still generated if you select the Request property on the Request tab. For more information about the options to which this property maps, see the Application Programming Reference section of the WebSphere MQ Version 7 Information Center online. |
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.
This property maps to the MQPMO_NEW_CORREL_ID option of the MQPMO
of the MQI. Clear the check box if you do not want to generate a new
ID. For more information about the options to which this property maps, see the Application Programming Reference section of the WebSphere MQ Version 7 Information Center online. |
Segmentation Allowed | Yes | No | Cleared | If you select this check box, WebSphere MQ breaks the message into segments
in the queue manager. Clear the check box if you do not want segmentation
to occur. For more information about message segmentation,
see Sending message segments in a WebSphere MQ message. For more information about the options to which this property maps, see the Application Programming Reference section of the WebSphere MQ Version 7 Information Center online. |
Message Context | Yes | No | Pass All | This property controls how origin context is
handled.
When a security profile is associated with the node and is configured to perform identity propagation, the chosen context can be overridden to ensure that the outgoing identity is set. For more information about the options to which these properties map, see the Application Programming Reference section of the WebSphere MQ Version 7 Information Center online. |
Alternate User Authority | Yes | No | Cleared | If you select this check box, alternate authority is used when the output message is put and the MQOO_ALTERNATE_USER_AUTHORITY option is set in the open options (MQOO) of the MQI. If you select this check box, this option is specified when the queue is opened for output. The alternative user information is retrieved from the context information in the message. Clear the check box if you do not want to specify alternative user authority. If you clear the check box, the broker service user ID is used when the message is put. |
The MQOutput node Request properties are described in the following table. These properties define the characteristics of each output message that is generated.
Property | M | C | Default | Description | mqsiapplybaroverride command property |
---|---|---|---|---|---|
Request | Yes | No | Cleared | If you select the check box, each output message
in the MQMD is generated as a request message (MQMT_REQUEST), and
the message identifier field is cleared (and set to MQMI_NONE) so
that WebSphere MQ generates a new identifier.
Clear the check box to indicate that each output message is not marked
as a request message. If you have set Destination
Mode to Reply To Queue,
you cannot select this check box. A new message identifier is generated even if the New Message ID check box is not selected on the Advanced tab. |
|
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. This name is inserted into the MQMD of each output message as the reply-to queue manager. | replyToQMgr | |
Reply-to Queue | No | Yes | The name of the WebSphere MQ queue to which to put a reply to this request. This name is inserted into the MQMD of each output message as the reply-to queue. | replyToQ |
The Validation properties of the MQOutput node are described in the following table.
For a full description of these properties, see Validation 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, and Inherit. | 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, and Exception List. |
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. |