This topic contains sections marked as revised for this release
Use the MQGet node to receive messages from clients that connect to the broker using the WebSphere MQ Enterprise Transport, and that use the MQI and AMI application programming interfaces. You can also use the MQGet node to retrieve messages that were previously placed in a WebSphere MQ message queue that is defined to the broker's queue manager.
This topic contains the following sections:
The MQGet node reads a message from a specified queue, and establishes the processing environment for the message. If appropriate, you can define the input queue as a WebSphere MQ clustered queue or shared queue.
You can use an MQGet node anywhere within a message flow, unlike an MQInput node, which you can use only as the first node in a message flow. The output message tree from an MQGet node is constructed by combining the input tree with the result tree from the MQGET call. You can set the properties of the MQGet node to control the way in which messages are received; for example, you can indicate that a message is to be processed under transaction control, or you can request that, when the result tree is being created, data conversion is performed on receipt of every input message.
The MQGet node is represented in the workbench by the following icon:
Look at the following topics to see how to use the MQGet node in a message flow:
When you have put an instance of the MQGet node into a message flow, you can configure it; for more information, see Configuring a message flow node. To display its properties, 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 MQGet node.
<mcd><Msd>MRM</Msd><Set>DHM4UO906S001</Set><Type>receiptmsg1</Type> <Fmt>XML</Fmt></mcd>
If you set values, and those values differ from those in the MQRFH2 header, the values in the MQRFH2 header take precedence.
Leave Message Set blank for XML, XMLNS, XMLNSC, JMS, MIME, and BLOB parsers.
Leave Message Type blank for XML, XMLNS, XMLNSC, JMS, IDOC, MIME, and BLOB parsers.
Leave Message Format blank for XML, XMLNS, XMLNSC, JMS, MIME, and BLOB parsers.
If you change this value to Immediate, partial parsing is overridden and everything in the message is parsed and validated, except those complex types with a composition of Choice or Message that cannot be resolved at the time. If you change this value to Complete, partial parsing is overridden and everything in the message is parsed and validated; complex types with a composition of Choice or Message that cannot be resolved at the time cause a validation failure.
For more details, refer to Validation properties.
You can enter any valid ESQL field reference (this reference can include expressions), including new field references to create a new node within the message tree for inserting the response into the message that is propagated from the input tree. For example, OutputRoot.XMLNS.ABC.DEF and Environment.GotReply are valid field references. See A request-response scenario using an MQGet node for more detailed information.
When the queue message bit string is parsed to create the contents of the message tree, the message properties that you have specified as the Input Message Parsing properties of the node are used.
You can enter any valid ESQL field reference (see the description of the Output Data Location property). The data that is placed at this location is always the complete result tree, with the body as a BLOB element. Result Data Location is not used for warning data.
If you select Include Message Contents in Output Message Assembly, it does not guarantee that the message contents are included in the output tree because the property depends on other node properties, such as the Generate Mode property.
For more details, refer to Validating messages and Validation properties.
Connect the Out, Warning, Failure, and No Message output terminals of this node to another node in the message flow to process the message further, process errors, or send the message to an additional destination.
See Connecting failure terminals for more information.
The terminals of the MQGet node are described in the following table.
Terminal | Description |
---|---|
In | The input terminal that accepts the message that is being processed by the message flow. |
Warning | The output terminal to which the output tree is propagated if an error (with a CC that indicates a warning) occurs within the node while trying to get a message from the queue. The MQMD part of the message is parsed, but the rest of the message is an unparsed BLOB element. The warning is discarded if the terminal is not connected, and there is no output propagation from the node at all. |
Failure | The output terminal to which the input message is routed if an error (with a CC that indicates an error that is more severe than a warning) occurs within the node while trying to get a message from the queue. |
Out | The output terminal to which the message is routed if it is retrieved successfully from the WebSphere MQ queue. |
No Message | The output terminal to which the input message is routed if no message is available on the queue. The output message that is propagated to the No Message terminal is constructed from the input message only, according to the values of the Generate Mode, Copy Message, and Copy Local Environment properties. |
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); 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 MQGet node are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Node name | No | No | The node type, MQGet | The name of the node. |
Short Description | No | No | Blank | A brief description of the node. |
Long Description | No | No | Blank | Text that describes the purpose of the node in the message flow. |
The Basic properties of the MQGet node are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Queue Name | Yes | Yes | None | The name of the WebSphere MQ message queue from which this node retrieves messages. |
The Input Message Parsing properties of the MQGet node are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Message Domain | No | No | None | The domain that is used to parse the queue message. |
Message Set | No | No | None | The name or identifier of the message set in which the queue message is defined. |
Message Type | No | No | None | The name of the queue message. |
Message Format | No | No | None | The name of the physical format of the queue message. |
The properties of the Parser Options for the MQGet node are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Parse Timing | No | No | On Demand | This property controls when an input message is parsed.
Valid values are On Demand, Immediate, and Complete. For a full description of this property, refer to Parsing on demand. |
Use MQRFH2C compact parser for MQRFH2 header | No | No | Cleared | This property controls whether the MQRFH2C compact parser, instead of the MQRFH2 parser, is used for MQRFH2 headers. |
Use XMLNSC Compact Parser for XMLNS Domain | No | No | Cleared | This property controls whether the XMLNSC Compact Parser is used for messages in the XMLNS Domain. If you set this property, the message data appears under XMLNSC in nodes that are connected to the output terminal when the input RFH2 header or Input Message Parsing properties Domain is XMLNS. |
Retain Mixed Content | No | No | Cleared | This property controls whether the XMLNSC parser creates elements in the message tree when it encounters mixed text in an input message. If you select the check box, elements are created for mixed text. If you clear the check box, mixed text is ignored and no elements are created. |
Retain Comments | No | No | Cleared | This property controls whether the XMLNSC parser creates elements in the message tree when it encounters comments in an input message. If you select the check box, elements are created for comments. If you clear the check box, comments are ignored and no elements are created. |
Retain Processing Instructions | No | No | Cleared | This property controls whether the XMLNSC parser creates elements in the message tree when it encounters processing instructions in an input message. If you select the check box, elements are created for processing instructions. If you clear the check box, processing instructions are ignored and no elements are created. |
The Advanced properties of the MQGet node are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Transaction Mode | No | No | Yes | This property controls whether the incoming message is received under syncpoint. Valid values are Automatic, Yes, and No. |
Generate Mode | No | No | Message | This property controls which parts of the message from the input tree are copied. Valid values are Message, LocalEnvironment, Message And LocalEnvironment, and None. |
Copy Message | No | No | None | This property controls which parts of the message from the input tree are copied. Valid values are None, Copy Headers, and Copy Entire Message. |
Copy Local Environment | No | No | This property controls which parts of the local environment are copied to the output message. Valid values are None, and Copy Entire LocalEnvironment. The default value is Copy Entire LocalEnvironment. | |
Wait interval (ms) | Yes | No | 1000 | The maximum time, in milliseconds, to wait for the queue message to be obtained from the message queue. |
Minimum message buffer size (KB) | Yes | No | 4 | The minimum size, in KB, of the get buffer. The minimum value of this property is 1 KB. |
The Request properties of the MQGet node are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Input MQMD Location | No | No | The location in the input message assembly where the MQMD that is to be used for the MQGET can be found. The default location is InputRoot.MQMD. | |
Input MQ Parameters Location | No | No | The location in the input message assembly where the MQ parameters (for example, the initial buffer size and the MQGMO overrides) can be found. The default location is InputLocalEnvironment.MQ.GET. | |
Get by Correlation ID | No | No | Cleared | If you select this check box, only messages that have the specified correlation ID are retrieved. |
Get by Message ID | No | No | Cleared | If you select this check box, only messages that have the specified message ID are retrieved. |
Use complete input MQMD | No | No | Cleared | If you select this check box, the complete MQMD is used; otherwise, only the message ID and correlation ID are used. |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
The Result properties of the MQGet node are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Output Data Location | No | No | OutputRoot | This property specifies where the output data is placed. If you leave the field blank, OutputRoot is used as a default. |
Result Data Location | No | No | ResultRoot | This property specifies which subtree (of the queue message) to use. If you leave this field blank, ResultRoot is used as a default, and the whole queue message is used. If, for example, ResultRoot.MQMD.ReplyToQ is specified, only that subtree is used. |
Output MQ Parameters Location | No | No | This property specifies where the output MQ parameters are located. If you leave this field blank, OutputLocalEnvironment.MQ.GET is used as a default. Set Generate Mode to include LocalEnvironment to ensure that the updated values are visible in downstream nodes. The default location is OutputLocalEnvironment.MQ.GET. | |
Warning Data Location | No | No | OutputRoot | This property specifies where the output data is placed if MQGET returns a warning code. If you leave this field blank, OutputRoot is used as a default. |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() If you select the Include Message Contents in Output Message Assembly check box, it does not guarantee that the message contents are included in the output tree because the property depends on other node properties, such as the Generate Mode property. ![]() |
The Validation properties of the MQGet node are described in the following table.
Refer to Validation properties for a full description of these properties.Property | M | C | Default | Description |
---|---|---|---|---|
Validate | No | Yes | None | This property controls whether validation takes place. Valid values are None, Content, Content and Value, and Inherit. |
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. |
Include All Value Constraints | No | No | True | You cannot edit this property. Basic value constraint checks are included in Content and Value validation. |
Fix | No | No | None | You cannot edit this property. |