Connecting MQ clients to multiple queue managers via a Client Channel Definition Table (CCDT)
You encounter problems when trying to connect your WebSphere MQ (WMQ) client applications to more than one queue manager. You want to know how to connect an MQ client to more than one queue manager.
Typical return codes when you are encountering problems:
2058 0x0000080a MQRC_Q_MGR_NAME_ERROR
2059 0x0000080b MQRC_Q_MGR_NOT_AVAILABLE
2009 0x000007d9 MQRC_CONNECTION_BROKEN
Resolving the problem
To connect a client to multiple queue managers you can use a Client Channel Definition Table (CCDT). In UNIX the channel table is created on the server machine in the /mqmtop/qmgrs/QUEUEMANAGERNAME/@ipcc directory when you define your client connection channels.
- You can define multiple client connection channels for the different queue managers to which you want the client to connect.
- You need to ensure that each queue manager has a corresponding server connection channel for the client connection channel defined for that queue manager in the CCDT.
- Copy the client channel table (AMQCLCHL.TAB) from the server machine to the client machine as a binary file. This can be copied into any directory that you choose on the client machine.
- In the client application, you will need to have multiple MQCONNs for each of the queue managers to which you want to connect, and use appropriately the corresponding queue manager handle for each connection, which will use a different server-connection channel.
- On the client machine you must unset the MQSERVER environment variable:
Windows: set MQSERVER=
UNIX: unset MQSERVER
- On the client machine you must set the MQCHLLIB and MQCHLTAB environment variables.
+ The MQCHLLIB environment variable must have the fully qualified path to the CCDT file.
+ The MQCHLTAB environment variable must have the name of the CCDT file.
For example, if you copied the client channel table into the /var/mydir directory, then you can set the environment variables on a UNIX system by typing:
- The MQCHLLIB can be in any directory that you choose on the client.
- You should only copy the channel table on the server machine to the client machines. You should not delete the channel table from the server machine: it is not recreated by the queue manager.
- This will work the same on all platforms except OpenVMS. The client channel table file is binary so will be able to be read on all platforms.
- For more detailed information see: Accessing client-connection channel definitions
- See MQCHLLIB and MQCHLTAB for more information.
- The following high availability sample program uses automated client reconnection and moves a message from the queue of a source queue manager to a remote queue manager.
The source code illustrates how to handle separate connections to multiple queue managers.
- Webcast: Using a Client Channel Definition Table (CCDT) in WebSphere MQ V7 for Queue Manager Groups
- Techdoc: Using a Client Channel Definition Table (CCDT) in WebSphere MQ V7 for Queue Manager Groups
- Techdoc: Using a CCDT file to connect to multiple WebSphere MQ queue managers using JMS
- Techdoc: Exploiting the Automatic Client Reconnect feature in WebSphere MQ JMS 7.0.1
- Techdoc: Exploiting the Automatic Client Reconnect feature introduced in WebSphere MQ 7.0.1 – MQI (C Code)
WebSphere MQ WMQ
More support for:
Software version: 6.0, 7.0, 7.0.1, 7.1, 7.5, 8.0
Operating system(s): AIX, HP-UX, IBM i, Linux, OpenVMS, Solaris, Windows, z/OS
Reference #: 1132630
Modified date: 09 July 2014
Translate this page: