WebSphere MQ

How to Connect to WebSphere MQ Queue Manager using CCDT file?

CCDT stands for Client Connection Definition Table. We can use such files to connect to WebSphere MQ Queue Manager, and send/receive messages from queues. However, as mentioned here, this mode of connection takes the least precedence. So, before we try it out, make sure that MQSERVER variable is unset, and there is no mqclient.ini file under /var/mqm.

How to create a CCDT file?

Be default, a CCDT file will already be created for your under the below location:

/var/mqm/<qmgr>/@ipcc/AMQCLCHL.TAB

You can take that as reference, and open it using the below steps:

export MQCHLLIB=/var/mqm//@ipcc [[path to the below TAB file]]
export MQCHLTAB=AMQCLCHL.TAB
runmqsc -n

This will open up the CCDT file, where you can run regular mqsc commands to update the AMQCLCHL.TAB file. Go ahead and add a CLNTCONN channel with the proper connection details.

DEF CHL(MYSVRCONN) CHLTYPE(CLNTCONN) CONNAME('localhost(1414)')

Once you come out of the runmqsc -n prompt, the file timestamp will be updated.

Use the below command to send message to local queue. Make sure that MQSERVER variable is unset, and mqclient.ini file doesn’t exist

/opt/mqm/samp/bin/amqsputc <localqueue>

Leave a Reply

Your email address will not be published. Required fields are marked *