Overriding MQGet node properties during message processing
When you include and configure an MQGet node in a message flow, you might want to override its properties under some conditions. For example, you might want to read from a queue that is identified in another part of the message, or that is retrieved from a database record.
About this task
To override the values that you set for the MQGet node properties to achieve a more dynamic way to process messages, include a Compute or JavaCompute node in your message flow before the MQGet node. Configure this node to create an output message, and add fields to the local environment tree to define new values for the properties that you want to change.
SET OutputLocalEnvironment.MQ.GET.QueueName = 'new_queue';- <parent folder>.policyUrl to override the whole policy for the node.
- <parent folder>.<MQEndpoint policy attribute> to provide (or override) a specific value.
Examples of the MQEndpoint policy attributes include destinationQueueManagerName and channelName. A special value of ‘-‘ can be used in the policyUrl property to mean “use the node attributes”, which is useful if only one value in the policy needs to be overridden.
Procedure
OutputLocalEnvironment.MQ.GET.
as the correlation name for all
fields that relate to the MQGet node.
You can set the following properties under the OutputLocalEnvironment.MQ.GET tree. If you have set a value for the Input MQ parameters location property on the MQGet node, that tree location is checked instead.
| Setting | Description |
|---|---|
| QueueName | This setting overrides the MQGet node
Queue name property; for example:
|
| InitialBufferSize | This setting overrides the MQGet node
Minimum message buffer size property; for example:
|
| MQGMO.* | This setting overrides the MQGET message options that are used by the MQGet node; for example:
This override is provided for flexibility, but use with caution because the MQGMO is
used exactly as specified. Node properties and other local environment overrides are not considered.
For more information about the MQGMO structure, see the IBM® MQ product documentation online. |
| policyUrl | This setting ignores the MQGet node policy, and uses ValidMQClientPolicy in
the TestPolicies
project:This
setting overrides any previous setting on the node regardless of whether a policy is configured for
the node. Using this setting also causes a search for policies in the run directory when a
previously deployed policy cannot be found. This allows policies to be used even if they were not
visible when the server started, enabling configuration to be changed by copying policy files into
place or by using a volume mount in a container to provide dynamic configuration updates. |
| connection | This setting overrides the MQGet node
connection property; for
example: |
| destinationQueueManagerName | This setting overrides the MQGet node
destinationQueueManagerName property; for
example: |
| queueManagerHostname | This setting overrides the MQGet node
queueManagerHostname property; for
example: |
| listenerPortNumber | This setting overrides the MQGet node
listenerPortNumber property; for
example: |
| channelName | This setting overrides the MQGet node
channelName property; for
example: |
SET OutputLocalEnvironment.MQ.GET.policyUrl = '{TestPolicies}:ValidMQClientPolicy';SET OutputLocalEnvironment.MQ.GET.policy.destinationQueueManagerName = 'Other_QM';Specifying a policyUrl of "-" causes the node attributes (either explicit configuration or policy) to be used as the attributes for the merge. This value enables a subset of node settings to be overridden without needing to know the policy for the node. For example, the following combination of settings would change only the channelName setting and use all of the other settings from the node configuration.
SET OutputLocalEnvironment.Destination.MQ.policyUrl = '-';
SET OutputLocalEnvironment.Destination.MQ.policy.channelName = 'SYSTEM.BKR.CONFIG';