This topic contains the following sections:
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. The MQGet node can also be used to retrieve messages that were previously placed in a WebSphere MQ message queue that is defined to the broker's queue manager.
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.
An MQGet node can be used anywhere within a message flow, unlike an MQInput node which can only be used 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 that 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 handles messages in the following message domains:
The MQGet node is represented in the workbench by the following icon:
Look at the following descriptions and samples to see how you can 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.
Right-click the node in the editor view and click Properties. The node's Basic properties are displayed in the properties dialog.
All mandatory properties are marked with an asterisk on the properties dialog.
Configure the MQGet node by doing the following:
<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.
For more details refer to Validating messages and Validation properties for messages in the MRM domain.
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 Using an MQGet node in a request-response flow for more detailed information.
When the retrieved message bit string is parsed to create the contents of the message tree, the message properties that you have specified as the Default 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 change this 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 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 for messages in the MRM domain.
Select the check box Use MQRFH2C Compact Parser if you want the MQRFH2C parser to be used. By default, this check box is cleared which means that the compact parser is not used.
For more information, refer to Manipulating messages using the XMLNSC parser.
Click Cancel to close the dialog and discard all the changes that you have made to the properties.
Connect the Out, Warning, Failure, and No Message output terminals of this node to another node in the message flow if you want to process the message further, process errors, or send the message to an additional destination.
What is propagated to each of the output terminals depends on the condition code (CC) generated by the MQGET call.
If the MQGET call is successful, the MQGet node routes each parsed output message to the Out terminal.
If the MQGET call fails, but with a CC indicating a warning, an unparsed output message is propagated to the Warning terminal.
If the MQGET call fails, with a CC more severe than a warning, the input message is propagated to the Failure terminal.
If the MQGET call fails, with a reason code
of MQRC_NO_MSG_AVAILABLE, the output message is propagated (without a result
body) to the No Message terminal. 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 and Copy Message, or Copy Local Environment
properties.
If you do not connect the Out, Warning, or No Message terminals to another node in the message flow, anything that is propagated to those terminals is discarded.
If you do not connect the Failure terminal to another node in the message flow, an exception is thrown by the broker when anything is propagated to that terminal.
See Connecting failure terminals for more information,
When you include an MQGet node in a message flow, the value that you set for Transaction Mode defines whether messages are received under syncpoint:
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 successfully retrieved from the WebSphere MQ queue. |
No Message | ![]() ![]() |
The following tables describe the node properties; the column headed M indicates whether the property is mandatory (marked with an asterisk on the properties dialog 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 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 Default properties of the MQGet node are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Message Domain | No | No | None | The domain that will be used to parse the message that is obtained from the message queue. |
Message Set | No | No | None | The name or identifier of the message set in which the message that is obtained from the message queue is defined. |
Message Type | No | No | None | The name of the message that is obtained from the message queue. |
Message Format | No | No | None | The name of the physical format of the message that is obtained from the message queue. |
The Advanced properties of the MQGet node are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Transaction Mode | No | No | Yes | Whether the incoming message is received under syncpoint. Valid values are Automatic, Yes, and No. |
Generate Mode | No | No | Message | 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 | 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 | Which parts of the message from the input tree are copied. Valid values are None, and Copy Entire LocalEnvironment. The default value is Copy Entire LocalEnvironment. | |
Wait interval | Yes | No | 1000 | The maximum time, in milliseconds, to wait for the message to be obtained from the message queue. |
Minimum message buffer size | Yes | No | 4 | The minimum size, in kilobytes, of the get buffer. The minimum value of this property is 1 kilobyte. |
The Validation properties of the MQGet node are described in the following table.
Refer to Validation properties for messages in the MRM domain for a full description of these properties.Property | M | C | Default | Description |
---|---|---|---|---|
Validate | No | Yes | None | Whether validation takes place. Valid values are None, Content, Content and Value, and Inherit. |
Failure Action | No | No | Exception | 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 | This property cannot be edited. The default action, indicated by the check box being selected, is that basic value constraint checks are included in Content and Value validation. |
Fix | No | No | None | This property cannot be edited. |
The Request properties of the MQGet node are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Input MQMD Location | No | No | Specifies where in the input message assembly 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 | Specifies where in the input message assembly 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 | False | When selected, this check box causes only messages that have the specified correlation ID to be got. |
Get by Message ID | No | No | False | When selected, this check box causes only messages that have the specified message ID to be got. |
Use complete input MQMD | No | No | False | When selected, this check box causes the complete MQMD to be used. Otherwise, only the message ID and correlation ID will be 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 | Specifies where the output data is placed. If left blank, OutputRoot is used as a default. |
Result Data Location | No | No | ResultRoot | Specifies which subtree (of the retrieved message) to use. If left blank, ResultRoot is used as a default, and the whole retrieved message is used. If, for example, ResultRoot.MQMD.ReplyToQ is specified, only that subtree is used. |
Output MQ Parameters Location | No | No | Specifies where the output MQ parameters are located. If left blank, OutputLocalEnvironment.MQ.GET is used as a default. Generate Mode should be set 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 | Specifies where the output data is placed if MQGET returns a warning code. If left blank, OutputRoot is used as a default. |
The properties of the General Message 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. Refer to Parsing on demand for a full description of this property. |
Use MQRFH2C Compact Parser for MQRFH2 Domain | No | No | False | This property controls whether the MQRFH2C Compact Parser, instead of the MQRFH2 parser, is used for MQRFH2 headers. |
The properties of the XMLNSC Parser Options for the MQGet node are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Use XMLNSC Compact Parser for XMLNS Domain | No | No | False | ![]() ![]() |
Mixed Content Retain Mode | No | No | None | This property controls whether the XMLNSC parser creates elements in the message tree when it encounters mixed text in an input message. Valid values are None and All. Selecting All means that elements are created for mixed text. Selecting None means that mixed text is ignored and no elements are created. |
Comments Retain Mode | No | No | None | This property controls whether the XMLNSC parser creates elements in the message tree when it encounters comments in an input message. Valid values are None and All. Selecting All means that elements are created for comments. Selecting None means that comments are ignored and no elements are created. |
Processing Instructions Retain Mode | No | No | None | This property controls whether the XMLNSC parser creates elements in the message tree when it encounters processing instructions in an input message. Valid values are None and All. Selecting All means that elements are created for processing instructions. Selecting None means that processing instructions are ignored and no elements are created. |
The Description properties of the MQGet node are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
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. |
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ac20806_ |