URL access to the CCDT

You can host a client channel definition table (CCDT) in a central location that can be accessed through a URL, removing the need to individually update the CCDT for each deployed client.

From IBM® MQ 9.0, a client channel definition table can be located through a URL in any of the following ways:
  • By programming using MQCNO
  • By using environment variables
    Attention: You can use the environment variable option only for native programs connecting as clients, that is C, COBOL, or C++ applications. The environment variables have no effect for Java, JMS or managed .NET applications.

    IBM MQ supports retrieving a CCDT from a file, ftp, or http URL.

  • By using the mqclient.ini file CHANNELS stanza.

The environment variable MQCCDTURL allows you to provide a file, ftp, or http URL as a single value from which a client channel definition table can be obtained.

You can also use the directory path specified by the MQCHLLIB environment variable (or the path specified by the ChannelDefinitionDirectory attribute in the CHANNELS stanza of the client configuration file) to locate a CCDT file, either through file, ftp, or http URL, in addition to the existing local file system directory, that is, /var/mqm). Note that an MQCHLLIB value is a directory stem and works in combination with MQCHLTAB to derive the fully qualified URL.

Basic authentication on connections is supported through the credentials being encoded in the URL:
Authenticated connections
export MQCHLLIB=ftp://myuser:password@myhost.sample.com/var/mqm/qmgrs/QMGR/@ipcc
export MQCHLLIB=http://myuser:password@myhost.sample.com/var/mqm/qmgrs/QMGR/@ipcc
Unauthenticated connections
export MQCHLLIB=ftp://myhost.sample.com/var/mqm/qmgrs/QMGR/@ipcc
export MQCHLLIB=http://myhost.sample.com/var/mqm/qmgrs/QMGR/@ipcc
export MQCHLLIB=file:///var/mqm/qmgrs/QMGR/@ipcc
Note: If you want to use authenticated connections you must, as with JMS, provide the user name and password encoded in the URL.
The order of precedence, for a native client application, to find a client channel definition is now:
  1. MQCD provided by ClientConnOffset and ClientConnPtr in MQCNO.
  2. URL provided by CCDTUrlOffset and CCDTUrlPtr in MQCNO.
  3. MQSERVER environment variable.
  4. If an mqclient.ini file is defined and contains a ServerConnectionParms then the channel that it defines is used. For more information, see Configuring a client using a configuration file and CHANNELS stanza of the client configuration file.
  5. MQCCDTURL environment variable.
  6. MQCHLLIB and MQCHLTAB environment variable.
  7. ChannelDefinitionDirectory and ChannelDefinitionFile in the CHANNELS stanza of the client configuration file.
Important: Access to a CCDT file using a URL always opens a read-only copy of the file, even when using the file:// protocol.

Attempting to open a CCDT file for write access, for example when using the runmqsc DEFINE CHANNEL command from a client, returns an error message indicating that the file could not be opened for write access.

It is, however, possible to read channel and authentication information definitions using runmqsc.