IBM MQ connections

The number of IBM® MQ connections that an integration node requires to a queue manager depends on the actions of the message flows that access the IBM MQ resource.

For a higher-level view of how IBM MQ connects with IBM App Connect Enterprise, see IBM MQ topologies.

For each integration node flow that accesses a queue, one connection is required for every message flow thread. If a different node on the same thread uses the same queue manager, the same connection is used.

The number of queue handles required also depends on the behavior of the flow. For each flow that accesses queues, one queue handle is required for each unique queue name for every message flow thread. Nodes that access the same queue name in the same flow use the same queue handle.

When you start an integration node, it opens IBM MQ queue handles, which remain open while it is running. The integration node caches these queue handles. For example, when a message flow node initiates access to the first IBM MQ resource it uses, it opens a connection for the queue manager and opens the queue. This connection is opened the first time that a message is processed by that message flow node. For MQInput nodes, the connection is opened when the flow is started. This queue handle remains open until:
  • The message flow becomes idle, and has not been used for 1 minute
  • The integration server is stopped
  • The integration node is stopped
The queue handle for the input node is not released when the flow is idle. The queue handle is released only when you stop the message flow.

A thread performing IBM MQ work becomes idle when it has not received any messages on its input queue for 1 minute. The allowed idle time starts from when the input queue being read becomes empty. If a message flow gets a message from the input queue, the timer is reset.

You can change the length of time after which a connection for an idle message flow is released, by setting the sharedConnectorIdleTimeout property of the mqsichangeproperties command, as shown in the following example:
mqsichangeproperties integrationNodeName -e integrationServerName -o Connectors -n sharedConnectorIdleTimeout -v new_timeout_value
where new_timeout_value is the number of seconds after which the connection is released. You can specify a value for the sharedConnectorIdleTimeout property as a positive integer (greater than 0), or you can specify that the connection never times out by setting the value to -1.

When a message flow is idle, the integration server periodically releases IBM MQ queue handles. Therefore, connections that are held by the integration node reflect its current use of these resources.