JSON Client Connection Definition Table
A client connection is a communication path between an IBM® Message Queue (MQ) client and an IBM® MQ server. Client connections are stored in a Client Connection Definition Table (CCDT). MQ clients parse this file to determine which queue manager (QM) to connect to and how to connect to it.
Prior to MQ v9.1.2 the CCDT was stored in binary format. From MQ v9.1.2 onwards we have the additional option of creating a CCDT in JavaScript Object Notation (JSON) format. The new format can be used to simplify configuration of QM groups, clusters and uniform-clusters. For more details on the JSON CCDT see the IBM® Knowledge Centre JSON CCDT documentation.
Format & validation
The binary CCDT is a proprietary format that requires the use of tools provided by MQ, such as runmqsc or the MQ Explorer.
The newly available JSON CCDT file is created as a flat file with a .json extension which can be created, viewed and edited with a generic text editor or other JSON tooling. Syntactical and semantic validation of the JSON CCDT can be assured by inputting the CCDT and the CCDT JSON schema into a JSON linter.
The CCDT schema ‘ccdt_schema.json’ is included with the MQ product and redistributable client packages in the following locations:
- UNIX & I-Series: $MQ_INSTALLATION_PATH/lib and /lib in the product and client packages respectively.
- Windows: %MQ_INSTALLATION_PATH%\bin and \bin in the product and client packages respectively.
The JSON linter can be an application of choice or a generic linter found online such as herokuapp, however care must be taken to protect sensitive information when using online linters.
Versatility
The flat file format of the JSON CCDT has an advantage in its versatility integrating with specialist tooling. For example it can be integrated with version control tools to track the CCDT change history or integrated with automation tools in a continuous deployment pipeline.
Both binary and JSON formats of the CCDT can be stored in a shared local or remote location which can be referenced by a client connected application with one of the following methods:
You can use directory path and file name to reference a CCDT locally or use one of the file, ftp, or http URL Uniform Resource Locators to define a CCDT remotely.
Compatibility
From MQ v9.1.2 Java, C & .NET clients are supported, these clients can use the JSON CCDT to connect to QMs on distributed or Z/OS platforms. Also runmqsc can be used to view but not edit JSON CCDTs. From MQ v9.1.2 clients and QMs of all versions greater than or equal to MQ v9.1.2 will be will be forwards and backwards compatible with the JSON CCDT.
For C MQI and Java™/JMS clients using the binary CCDT, the version of the C MQI client libraries or MQ JAR files respectively, must be equal to or greater than the version of the QM that was used to build the CCDT. From v9.1.2 onwards for C MQI and Java™/JMS clients using the JSON CCDT, upgrading the C MQI client libraries or MQ JAR files is no longer necessary when integrating a new JSON CCDT version.
Simplified configuration for existing IBM® MQ features
The JSON CCDT format has other benefits that can simplify configuration of multiple QMs when using CCDT features such as QM Groups.
The binary CCDT prohibits the definition of multiple channels of the same name, consequently each QM requires distinct SVRCONN channel configurations. With the JSON CCDT each QM can use the same SVRCONN channel name which reduces the complexity of configuring multiple QMs within a QM Group.
A client connected application utilising the binary CCDT needs to define multiple channel names which are updated whenever a new QM is added to the group. Whereas with the JSON CCDT new client channel definitions might be almost identical with the exception of the conname attribute used to specify the host and port of the target QM.
New IBM® MQ features
The JSON CCDT format also helps facilitate new features introduced in MQ v9.1.2 such as the Uniform Cluster with support for application balancing. A Uniform Cluster is cluster of QMs that share near-identical configuration to offer the same messaging services to a pool of reconnectable client connected applications.
Client connected application workload balancing is provided by the Uniform Cluster whereby an algorithm communicated across the QMs dynamically redistributes reconnectable client connections across the QMs by assessing each QM’s current capacity. For more information on application rebalancing see the following blog article: Auto application rebalancing using the Uniform Cluster pattern.
As mentioned the introduction of the JSON CCDT has simplified the configuration for deploying client connected applications to groups of QMs. Removing the dependency on runmqsc to edit the CCDT also simplifies the dynamic scaling of Uniform Clusters and client connected applications by making it easier to automate changes to the CCDT as the shape of a Uniform Cluster environment changes. For more information on Uniform Clusters see the following blog article: IBM Private Cloud and MQ’s Uniform Cluster.
JSON CCDT Example
Two client connection channels of the same name:
{
"channel":
[
{
"name": "duplicatedChannel",
"clientConnection":
{
"connection":
[
{
"host": "localhost",
"port": 1415
}
],
"queueManager": "QM1"
},
"type": "clientConnection"
},
{
"name": "duplicatedChannel",
"clientConnection":
{
"connection":
[
{
"host": "localhost",
"port": 1416
}
],
"queueManager": "QM2"
},
"type": "clientConnection"
}
]
}