MQGet node
Use the MQGet node to receive messages from clients that connect to the integration node by using the WebSphere® MQ Enterprise Transport.
- Developer
- Application Integration Suite
- Standard
- Advanced
- Express
- Scale
- Adapter
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 integration node queue manager.
WebSphere MQ is available as a separate installation package, and your IBM® Integration Bus license entitles you to install and use WebSphere MQ with IBM Integration Bus. For more information, see Enhanced flexibility in interactions with WebSphere MQ and Installing WebSphere MQ.
This topic contains the following sections:
Purpose
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 in 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 how 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.
For information about how to configure the MQGet for transactions, see Configuring MQ nodes for transactions.
On distributed systems, you can configure the MQGet node to get messages from a WebSphere MQ queue on any local or remote queue manager, by either setting the MQ Connection properties, or specifying an MQEndpoint policy on the Policy tab.
If the integration node has a queue manager associated with it, then the MQ message flow node by default connects to that queue manager with server bindings. If you configure properties on the MQ Connection tab, then these properties will be used to connect to the specified queue manager. If you specify a MQEndpoint policy, then the values in the policy will be used instead of the values defined in the MQ Connection tab.
On z/OS®, only local connections to queue managers are supported. You must have a queue manager specified for the integration node, but you can also connect to other local queue managers on an MQGet node by using server bindings for the connection.
You can connect to a secured local or remote queue manager by using the Security identity property on the MQGet node to pass a user name and password to the queue manager. The identity is defined using the mqsisetdbparms command. You can use the Security identity property to provide the security credentials on local and client connections, but it is not available for client connections that use a client channel definition table (CCDT). You can also choose whether to use the SSL protocol when a client connection is made to a remote queue manager. Select the Use SSL property on the MQGet node to provide confidentiality on the client connection by using SSL. You can also set this property through an MQEndpoint policy. For more information about using security identities and SSL, see Connecting to a secured WebSphere MQ queue manager.
- DFDL
- XMLNSC
- DataObject
- JSON
- BLOB
- MIME
- MRM
- JMSMap
- JMSStream
- XMLNS
The MQGet node is contained in the WebSphere MQ drawer of the palette, and is represented in the IBM Integration Toolkit by the following icon:
Using 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. The properties of the node are displayed in the Properties view. All mandatory properties for which you must enter a value (those properties that do not have a default value defined) are marked with an asterisk.
For information about how to use the MQGet node in a message flow, see How the MQGet node implements WebSphere MQ MQGet API calls.
Connecting the terminals
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.
- 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 that indicates 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, Copy message, and Copy local environment properties.
- If you do not connect the Out, Warning, or No Message terminals to another node in the message flow, any message that is propagated to those terminals is discarded.
- If you do not connect the Failure terminal to another node in the message flow, the integration node generates an exception when a message is propagated to that terminal.
For more information, see Connecting Failure terminals.
Terminals and properties
When you add an MQGet node to a message flow, you can use the Properties view in the Message Flow editor to configure it. To display field help, click within a field, and then click the information icon that is displayed at the beginning of the field. All mandatory properties that do not have a default value defined are marked with an asterisk. For general configuration information see Configuring a message flow node. You can also use an MQ Service to configure the MQGet node, but this is supported only if a queue manager has been specified on the integration node. See Configuring an MQ node by using an MQ Service.
You can create and attach operational policies to control particular connection properties for this type of node at run time. For more information about policy, see Operational policy properties.
The following tables describe the node terminals and the node properties that you can set on a specified tab in the Properties view in the Message Flow editor. 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).
Table of node terminals
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 in 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 in 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. |
Tables of node properties
Property | M | Default | Description |
---|---|---|---|
Node name | No | The node type, MQGet | The name of the node. |
Short description | No | Blank | A brief description of the node. |
Long description | No | Blank | Text that describes the purpose of the node in the message flow. |
Property | M | Default | Description |
---|---|---|---|
Queue name | Yes | None | The name of the WebSphere MQ message
queue from which this node retrieves messages. You must predefine this queue to the queue manager that hosts the integration node on which the message flow is deployed. If this queue is not a valid queue, the node generates an exception, and the input message is propagated to the Failure terminal. |
Property | M | Default | Description |
---|---|---|---|
Connection | No | Local queue manager | This property specifies how a connection is
made to WebSphere MQ:
Valid values for mqsiapplybaroverride are SERVER, CLIENT, and CCDT. |
Destination queue manager name | No | This property specifies the name of the queue manager on which the message queues are defined. | |
Queue manager host name | No | This property specifies the host name of the
queue manager. To achieve high availability, you can specify more than one host name by separating each host name with a comma. The first host name in the list is used as the primary host name. If the connection to the host name becomes unavailable, the next host name is used, and so on. For more information about high availability in WebSphere MQ, see the WebSphere MQ Version 7.5 product documentation online. |
|
Listener port number | No | This property specifies the port on which the queue manager is listening. | |
Channel name | No | This property specifies the name of the channel that is used by the queue manager to send and receive messages. | |
Security identity | No | This property specifies an identity that is
used to provide username and password credentials for connections
to a secured local or remote queue manager. It can be used to provide
credentials on local and client connections, but it is not available
for client connections that are configured using a client channel
definition table (CCDT). The identity is defined using the mqsisetdbparms command. When
you set the security identity by using this command, ensure that it
is prefixed by For more information, see Connecting to a secured WebSphere MQ queue manager. |
|
Use SSL | No | No | This property controls whether the SSL protocol
is used when a client connection is made to a remote queue manager.
Select this property to provide confidentiality on the client connection
by using SSL. You can also set this property through an MQEndpoint policy. You can use SSL for client connections that are configured using either the MQ client connection properties or a client channel definition table (CCDT). If you select Use
SSL and specify the connection details through MQ client connection properties,
you can also set the following properties:
If
you select the Use SSL property,
you must also specify the location of the SSL key repository. The
SSL key repository is created using the WebSphere MQ GSkit, and it holds the required
private and public certificates appropriate to the chosen certificate
policy for the queue manager. You specify the key repository location
by using the mqsichangeproperties command;
it is specified as the SSL key repository full file path minus the .kdb file
extension. For example, if the SSL key repository is located in C:\SSL\key.kdb,
you set it by using the following command :
The SSL key repository password stash file key repository file name.sth must be located in same folder location as the key repository. The stash file is created using WebSphere MQ GSKit. Use the MQSC REFRESH SECURITY command to pick up the changes to the SSL key repository. For more information, see Connecting to a secured WebSphere MQ queue manager. |
SSL peer name | No | This property specifies the name that is passed
to the remote queue manager when making the client connection; there
must be a positive match for the connection to succeed. You can specify this property if the Use SSL property is selected and the client connection details are specified through MQ client connection properties. It is not used for client connections that use a client channel definition table (CCDT); you can specify this information in the CCDT. |
|
SSL cipher specification | No | This property specifies the name of the symmetric
key cryptography algorithm through which the remote queue manager
is secured. You can specify this property if the Use SSL property is selected and the client connection details are specified through MQ client connection properties. It is not used for client connections that use a client channel definition table (CCDT); you can specify this information in the CCDT. |
Configure the connection details to enable a message to be retrieved from a queue on a local or remote queue manager. Values that are set on the MQ Connection tab are used at run time, unless overridden by a value in an MQEndpoint policy that is specified on the Policy tab.
Property | M | Default | Description |
---|---|---|---|
Message domain | No | BLOB | The domain that is used to parse the message. If the field is blank then the default is BLOB. |
Message model | No | Cleared | The name or location of the message model schema
file in which the message is defined. When you click Browse, you see a list of available message model schema files for the selected Message domain. |
Message | No | Cleared | The name or location of the message root within your message model schema file. This list is populated with all available messages that are defined in the Message model that you have selected. |
Physical format | No | Cleared | The name of the physical format of the message. If you are using the MRM or IDOC parser, select the physical format of the incoming message from the list. This list includes all the physical formats that you have defined for the selected message model. If you set the Message domain property to DataObject, you can set this property to XML or SAP ALE IDoc. Set this property to SAP ALE IDoc when you have to parse a bit stream from an external source and generate a message tree. |
<mcd>
folder
in the MQRFH2 header; for example: <mcd><Msd>MRM</Msd><Set>DHM4UO906S001</Set><Type>receiptmsg1</Type><Fmt>XML</Fmt></mcd>
If
you set values, and the values differ from those values in the MQRFH2
header, and the <Msd>
element is a valid domain,
the values in the MQRFH2 header take precedence.Property | M | Default | Description |
---|---|---|---|
Parse timing | No | On Demand | This property controls when the queue message is parsed. Valid values are On Demand, Immediate, and Complete. By default, this property is set to On Demand, which causes parsing of the message to be delayed. To cause the message to be parsed immediately, see Parsing on demand. |
Use MQRFH2C compact parser for MQRFH2 header | No | Cleared | This property controls whether the MQRFH2C compact parser, instead of the MQRFH2 parser, is used for MQRFH2 headers. Select Use MQRFH2C compact parser for MQRFH2 header 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. |
Build tree using XML schema data types | No | Cleared | This property controls whether the XMLNSC parser creates syntax elements in the message tree with data types taken from the XML schema. You can select this property only if you set the Validate property on the Validation tab to Content or Content and Value. For more information about XMLNSC, see Manipulating messages in the XMLNSC domain. |
Use XMLNSC compact parser for XMLNS domain | 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 is displayed under XMLNSC in nodes that are connected to the output terminal when the input MQRFH2 header or Input Message Parsing properties Message domain is XMLNS. |
Retain mixed content | No | Cleared | This property controls whether the XMLNSC parser creates elements in the message tree when it encounters mixed text in the queue message 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 | Cleared | This property controls whether the XMLNSC parser creates elements in the message tree when it encounters comments in the queue message 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 | Cleared | This property controls whether the XMLNSC parser creates elements in the message tree when it encounters processing instructions in the queue 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. |
Opaque elements | No | Blank | This property is used to specify a list of elements in the queue message that are to be opaquely parsed by the XMLNSC parser. Opaque parsing is performed only if validation is not enabled (that is, if Validate is None); entries that are specified in Opaque Elements are ignored if validation is enabled. |
Property | M | Default | Description |
---|---|---|---|
Transaction mode | No | Yes | This property controls whether the incoming
message is received under sync point. Select a value for Transaction mode from the list to
define the transactional characteristics of how this message is handled:
For more information, see Configuring MQ nodes for transactions. |
Generate mode | No | Message | This property controls which parts of the message
from the input tree are copied. Select a value for Generate mode from the list to define
which components of the output message are generated in the MQGet node, and which components
are taken from the input message.
|
Copy message | No | None | This property controls which parts of the message
from the input tree are copied. If you have set Generate mode to either Message or Message And LocalEnvironment,
select a value for Copy message from
the list to define which parts of the message are generated in the MQGet node, and which parts
are taken from the input message.
|
Copy local environment | No | Copy Entire LocalEnvironment | This property controls how the local
environment is copied to the output message. If you have set Generate mode to either LocalEnvironment or Message And LocalEnvironment,
select a value for Copy Local Environment from
the list to define which parts of the local environment are generated
in the MQGet node, and
which parts are taken from the input message.
|
Wait interval (ms) | Yes | 1000 | The maximum time, in milliseconds, to wait for
the queue message to be obtained from the
message queue. Provide a value for the Wait interval (ms) property to specify how many milliseconds to wait for a message to be received from the MQGET call. If you select 0, the wait interval is disabled and there is no wait time for messages. The Wait interval (ms) value cannot be negative. If you do not provide a value, the default value of 1000 milliseconds is used. |
Minimum message buffer size (KB) | Yes | 4 | The minimum size, in KB, of the get buffer.
The minimum value of this property is 1. Provide a value for this property to specify the size of the initial buffer for the MQGET call. The buffer expands automatically to accept a message of any size, but if messages are likely to be large, specify a suitable value to reduce the frequency of the buffer being resized. If you do not provide a value, the size of the buffer is 4 KB. |
Property | M | Default | Description |
---|---|---|---|
Input MQMD location | No | InputRoot.MQMD | 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 | InputLocalEnvironment.MQ.GET | The location in the input message assembly where the WebSphere 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 | Cleared | If you select this check box, only messages
that have the specified correlation ID are retrieved. If you select Get by correlation ID, the Setting
the |
Get by message ID | No | Cleared | If you select this check box, only messages
that have the specified message ID are retrieved. If you select Get by message ID, the |
Use all input MQMD fields | No | Cleared | If you select Use
all input MQMD fields, all MQMD fields at the Input MQMD location are used to
retrieve the message. If an MQMD bit stream is present at the Input MQMD location, all fields
in the bit stream are used. Make sure that the MQMD of the message
to be retrieved matches these fields. By default, this check box is
cleared. If you do not supply an input MQMD, the default MQMD is used. If you do supply an input MQMD, the default MQMD is used
after the following modifications:
|
Browse only | No | Cleared | This property controls whether a message is removed from the queue when it is read. If this check box is selected, the message is not removed from the queue when it is read. Select Browse only to specify that the message must be retained on the queue when it is read. |
Reset browse cursor | No | Cleared | You can set this property only if you have selected Browse only. When you select Reset browse cursor, the node browses
from the start of the MQ queue (that is, the MQGMO_BROWSE_FIRST MQ
get option is specified). If you do not select this property, the node browses from the current cursor position in the MQ queue (that is, the MQGMO_BROWSE_NEXT MQ get option is specified). |
Property | M | Default | Description |
---|---|---|---|
Output data location | No | OutputRoot | This property specifies where the output data
is placed. If you leave the field blank, OutputRoot is used as a default.
Enter the start location in the output message tree at which the parsed
elements from the bit string of the queue message are
stored. All elements at this location are deleted, and the default
behavior is to replace the input tree message with the queue message. You can enter any valid ESQL
field reference (this reference can include expressions), including
new field references to create a node in the message tree for inserting
the response into the message that is propagated from the input tree.
For example, 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. |
Result data location | 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. Set this property to control which subtree
of the queue message is placed in the output
message. If, for example, you want only the MQMD from the queue message, use |
Output MQ parameters location | No | OutputLocalEnvironment.MQ.GET | This property specifies where the output WebSphere 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. Set this property to control where the CC (completion code), the RC (reason code), the Browsed indicator, and any other WebSphere MQ parameters (for example, the MQMD that is used by the MQGET call) are placed in the output tree. |
Warning data location | 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. Set this property to control where the queue message is placed when the MQGET call returns a warning code. 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. |
Include message contents in output message assembly | No | Selected | This property specifies that no result or warning
data is required for the output message assembly. If you select this
check box, the node gets or browses the message on the queue without
completely reading or parsing its contents. If you select Include message contents in output message assembly, the message contents are not guaranteed to be included in the output tree because this inclusion depends on other node properties, such as the Generate mode property. Clear Include message contents in output message assembly to specify that no result or warning data is required for the output message assembly. This action gets or browses the message on the queue without reading or parsing its contents. |
Set the Result properties to determine how the results of the MQGET call are handled.
Property | M | Default | Description |
---|---|---|---|
Validate | No | None | This property controls whether validation takes place. Valid values are None, Content, Content and Value, and Inherit. |
Failure action | 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. |
For a full description of these properties, see Validation properties.
Property | M | Default | Description |
---|---|---|---|
Policy URL | No | Set the value of this field to the location
of an MQEndpoint policy to use
the connection details defined in that policy for this MQ node. If an MQEndpoint policy is specified, the property values that are set in the policy are used at run time. The properties that are set in the policy override the corresponding properties that are set on the MQ Connection tab. If an MQEndpoint policy is not specified, then property values that are set on the MQ Connection tab are used. If no MQEndpoint policy is specified, and the Connection property on the MQ Connection tab is set to Local queue manager with no queue manager specified (the default state), then the MQ node uses the connection details for the queue manager that was specified for the integration node. If no queue manager was specified for the integration node, then the message flow will not deploy. |
If an MQEndpoint policy is specified, then any equivalent properties that are set on the MQ Connection tab are ignored at run time. For more information about operational policies that can be applied to MQ nodes, see MQEndpoint policy.
Property | M | Default | Description |
---|---|---|---|
Events | No | 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 by using monitoring properties for details. You can enable and disable events that are shown here by selecting or clearing the Enabled check box. |
Configurable properties
The following table describes the node properties that are configurable (you can change the property value when you add the message flow to the BAR file for deployment by using the mqsiapplybaroverride command). The table maps the message flow node properties to the corresponding properties of the mqsiapplybaroverride command.
For more information about configurable properties, see Configurable properties in a BAR file.
Table of configurable properties
Property | mqsiapplybaroverride command property |
---|---|
Queue name | queueName |
Connection type | connection |
Destination queue manager name | destinationQueueManagerName |
Queue manager host name | queueManagerHostname |
Listener port number | listenerPortNumber |
Channel name | channelName |
Security identity | securityIdentity |
Use SSL | useSSL |
SSL peer name | SSLPeerName |
SSL cipher specification | SSLCipherSpec |
Validate | validateMaster |
Policy URL | policyUrl |
Operational policy properties
You can create and attach MQEndpoint policies to MQ nodes to control the behavior of the node at run time. The following table maps the operational properties of the message flow node to the corresponding properties of the node policy document. Operational properties are properties that you can control the value of at run time by using an operational policy.
mqsichangeproperties IBNODE -o BrokerRegistry -n mqCCDT -v file_path
For more information about operational policy and how to use a policy in a message flow, see Operational policy and MQEndpoint policy.
Table of operational properties
Property | Policy document property |
---|---|
Connection type | connection |
Destination queue manager name | destinationQueueManagerName |
Queue manager host name | queueManagerHostname |
Listener port number | listenerPortNumber |
Channel name | channelName |
Security identity | securityIdentity |
Use SSL | useSSL |
SSL peer name | SSLPeerName |
SSL cipher specification | SSLCipherSpec |