Configuring a client connection to WebSphere MQ

On distributed systems, you can configure a client connection to WebSphere® MQ by defining a connection channel and listener on WebSphere MQ and setting the MQ Connection properties of the MQ node on IBM® Integration Bus.

Before you begin

Complete the following tasks:
  • Read the topic Configuring connections to WebSphere MQ.
  • Ensure that the required queue manager has been created on the WebSphere MQ server.
  • Ensure that the user ID that is running the integration node has the necessary permissions to access the queue manager.
  • Decide how you want to connect to the queue manager. You can either configure the connection properties on the MQ Connection tab of the MQ node, or you can use an MQEndpoint policy on the Policy tab. The steps in this topic explain how to configure connections by using the properties on the MQ Connection tab. The properties that you can set in a policy are listed in the MQ node topics, such as the MQInput node; for more information about using an MQEndpoint policy, see MQEndpoint policy.

About this task

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.

If WebSphere MQ is running on separate machines from IBM Integration Bus, you can configure a client connection so that your integration node can access messages on the remote queue managers. On z/OS®, you can define only a local connection to a queue manager.

You can define a client connection on the MQ node either by specifying the connection details of the queue manager explicitly, through the MQ client connection properties, or by selecting the Connect with CCDT property to use a client channel definition table (CCDT) that contains the details of the connection. The MQ Connection properties are available on the following MQ nodes:
  • MQInput
  • MQOutput
  • MQGet
  • MQReply

Procedure

You configure a client connection by configuring the connection channel and listener on WebSphere MQ, and setting the MQ Connection properties on IBM Integration Bus.

On the machine that is running your WebSphere MQ queue manager:

  1. Define a server-connection channel for the queue manager, and ensure that the number of shared conversations is set to a minimum of 10.
    The number of conversations that can share a TCP/IP connection is specified by the SHARECNV property on the WebSphere MQ channel, and the default for this property is 10. If too few shared conversations are defined on the channel, errors can occur when the MQ node attempts to connect to the queue. For information about how to define a channel, see the WebSphere MQ Version 7.5 product documentation online.
  2. Define a TCP/IP listener.
    For information about how to define a listener, see the WebSphere MQ Version 7.5 product documentation online.

Define the client connections on the machine that is running your integration node:

  1. Decide how you want to define the connections to the queue manager.
    You can either configure them on the MQ Connection tab of the MQ node, or you can control them by using an MQEndpoint policy on the Policy tab. The remaining steps in this topic explain how to configure connections by using the properties on the MQ Connection tab. The properties that you can set in a policy are listed in the MQ node topics, such as the MQInput node; for more information about using an MQEndpoint policy, see MQEndpoint policy.
  2. On the MQ Connection tab, choose one of the following options for the Connection property:
    • Select MQ client connection properties to make a client connection to the queue manager by explicitly specifying the connection details of the target queue manager. Specify the following connection properties for the target queue manager:
      • Queue manager host name
      • Listener port number
      • Channel name
      • Destination queue manager name
    • Select Connect with CCDT to use client connection details that are specified in a client channel definition table (CCDT) file. If this option is selected, you must also specify the target queue manager name.
      Specify the location of the CCDT file by running the mqsichangeproperties command, using the integration node registry object property mqCCDT. For example:
      mqsichangeproperties IBNODE -o BrokerRegistry -n mqCCDT -v "C:\Program Files (x86)\IBM\WebSphere MQ\Qmgrs\QM1\@ipcc\AMQCLCHL.TAB"
      When you have set the mqCCDT property, restart the integration node for the changes to take effect. For more information, see Integration node registry object parameter values.

      If you select Connect with CCDT and the mqCCDT property is not set, a runtime errors occurs when IBM Integration Bus attempts to connect to the specified queue manager. The mqCCDT property applies to a specific integration node, so if you want to connect to different queue managers using a CCDT, you must define separate client connection channels in the CCDT file for each queue manager.

      To learn how to configure the CCDT file so that is available to IBM Integration Bus, see the WebSphere MQ Version 7.5 product documentation online. Only one CCDT file can be used at a time by an integration node. If you originally configured your client connection by using MQ client connection properties, and want to use a CCDT file after deployment, you must run the mqsiapplybaroverride command and change the connection type to CCDT. If you use an MQEndpoint policy to specify the CCDT file, you must also run the mqsichangeproperties command to specify the CCDT file path.

  3. Optional: Configure the connection to use a security identity for authentication, SSL for confidentiality, or both, by completing the steps described in Connecting to a secured WebSphere MQ queue manager.

What to do next

All WebSphere MQ connections remain open until one of the following events occurs:
  • An error occurs while the queue manager is being accessed, and a new connection is required as a result.
  • The message flow is stopped.
  • The integration node is stopped.
  • The message flow is idle for a time that exceeds the timeout threshold set for the connection. By default, this threshold is set to 1 minute; however, you can change the threshold by setting the sharedConnectorIdleTimeout property of the mqsichangeproperties command. For more information, see WebSphere MQ connections.

If you later decide that you want to control connection properties by using an MQEndpoint policy, property values that are set on the MQ Connection tab are ignored when a policy is attached to the message flow node. If you want to revert to using the connection details of the queue manager that was specified on the integration node, unset all Policy URL and MQ Connection tab properties.