[V9.1.2 Mar 2019]

Configuring a JSON format CCDT

The client channel definition table (CCDT) determines the channel definitions and authentication information used by client applications to connect to the queue manager. You use a text editor to create and update a JavaScript Object Notation (JSON) CCDT.

Before you begin

[UNIX, Linux, Windows, IBM i]If you are using IBM® MQ for Multiplatforms, you can instead use the binary CCDT that is created automatically when you create a queue manager. See Configuring a binary format CCDT.

About this task

The file name of the CCDT schema for the JSON format is:
Linux®
/opt/mqm/lib/ccdt_schema.json
Windows
C:\Program Files\IBM\MQ\bin\ccdt_schema.json

There is no default JSON CCDT, and IBM MQ does not supply any tooling to create or edit CCDTs in JSON format. Nonetheless, you have more configuration options when you manually develop a JSON CCDT than when you use the runmqsc command to work with a binary CCDT:

  • You do not need to be using IBM MQ for Multiplatforms to create and edit a JSON CCDT file.
  • Using the JSON format, you can define duplicate channel definitions of the same name. When you deploy IBM MQ on the cloud, you can use this to make your deployment scalable and highly available.
  • The JSON file is human readable, which can simplify queue manager configuration.
  • A flat file format can be integrated with:
    • Version control tooling to track the CCDT history
    • Automation tooling in continuous delivery
  • You need no specialist tooling to maintain the CCDT file.
  • The file is smaller.
  • This format provides backwards and forwards compatibility.
Notes:
  1. The JSON standard sees duplicate keys as valid, however, the JSON parser only takes the last read value of duplicate keys when assigning attributes. Therefore, when defining duplicate channels, each channel must be an element of an array value that is assigned to the 'channel' key.
  2. The key and attribute values in JSON CCDTs must be provided exactly as specified in the schema. Especially note that the JSON parsing is case-sensitive.
  3. JSON CCDTs do not support storing of Lightweight Directory Access Protocol (LDAP) server locations for Certificate Revocation Lists (CRL) and Online Certificate Status Protocol (OCSP) responder location information.
Table 1. Encoding requirements by platform
Platform JMS client encoding C client encoding
[UNIX, Linux, Windows]UNIX platforms, Linux, and Windows ASCII ASCII
[z/OS]z/OS® Either ASCII or EBCDIC Not applicable
Attention: When you provide any definition for a channel through a JSON CCDT (including a sparse one which does not include all attributes), a complete channel definition is constructed with all attributes defined, using the defaults for anything not specified in the JSON.

Therefore, you must provide specific values for each attribute for which you do not want the default value.

Procedure

  • Create a JSON CCDT
    1. Create a flat file with a .json extension with a generic text editor.
    2. Define a CCDT.
  • Locate the CCDT:
    • On the client computer
    • At a location shared by more than one client
    • On the server as a shared file

    See Locations for the CCDT.

  • Validate a JSON CCDT

    Validate the CCDT against the schema with a JSON linter.

    See How to validate an IBM MQ CCDT JSON file against the schema for information on how to create a CCDT file with two channels and validate that it works.

    The CCDT Schema is included with the product and client packages:

    • [UNIX]On UNIX systems:

      $MQ_INSTALLATION_PATH/lib and /lib in the product and client packages respectively.

    • [Windows]On Windows:

      %MQ_INSTALLATION_PATH%\bin and \bin in the product and client packages respectively.

    Notes:
    • JSON linters are available online.
    • The schema defines mandatory attributes with the 'required' key.
    • The schema defines attribute data types with the 'type' key.
  • Access the CCDT
    You can access the CCDT: See Locations for the CCDT for various examples.
  • View or edit the CCDT contents

    Each entry of a CCDT represents a client connection to a specific queue manager. You can view or edit the CCDT contents with a text editor.

    If you want only to view the CCDT, you can also do this using the runmqsc command as follows:
    1. Set environment variables to give you access to the CCDT, as described in the previous step.
    2. Run the command runmqsc -n . For more information, see runmqsc.
    3. Run the DISPLAY CHANNEL command. For example, run DISPLAY CHANNEL(*).