Friday, November 14, 2014

IBM Websphere MQ mqclient.ini - One place for all your client configuration - Middleware News

For the last few releases, there has been the concept of a ini file for the client, just like qm.ini, but called mqclient.ini. It's purpose is to provide a single file which includes all the configuration for the client and for this reason it includes various items that were previously configured by means of environment variables. The table below summaries these items.

The mqclient.ini file allows you to gather together all your client configuration into one file, easier to deploy, keep a backup of, and replace when changes are required, rather than a random selection of environment variables. A great idea.


nvironment Variable mqclient.ini stanza mqclient.ini value Description
MQCCSID CHANNELS CCSID The coded character set number to be used
MQCHLLIB CHANNELS ChannelDefinitionDirectory The directory path to the file containing the CCDT
MQCHLTAB CHANNELS ChannelDefinitionFile The name of the file containing the CCDT
MQSERVER CHANNELS ServerConnectionParms The location of the MQ server and the communication method to be used
MQCERTLABL SSL CertificateLabel Defines the certificate label
MQCERTVPOL SSL CertificateValPolicy Determines the type of certificate validation used
MQSSLCRYP SSL SSLCryptoHardware The parameter string required to configure PKCS #11 cryptographic hardware
MQSSLFIPS SSL SSLFipsRequired Whether only FIPS-certified algorithms are to be used
MQSSLKEYR SSL SSLKeyRepository The location of the key repository that holds the user's digital certificate
MQSSLPROXY SSL SSLHTTPProxyName The HTTP Proxy server that is to be used by GSKit for OCSP checks
MQSSLRESET SSL SSLKeyResetCount The number of unencrypted bytes sent and received before the secret key is renegotiated
MQSUITEB SSL EncryptionPolicySuiteB Whether Suite B compliant cryptography is to be used
MQIPADDRV TCP IPAddressVersion Specifies which IP protocol to use for a channel connection
MQTCPTIMEOUT TCP Connect_Timeout How long MQ waits for a TCP connect call
MQNAME NETBIOS LocalName The name by which this computer is known on the LAN

 

Configuring a client using a configuration file

Configure your clients using attributes in a text file. These attributes can be overridden by environment variables or in other platform-specific ways.
You configure your WebSphere® MQ MQI clients using a text file, similar to the queue manager configuration file, qm.ini, used on UNIX and Linux platforms. The file contains a number of stanzas, each of which contains a number of lines of the format attribute-name=value .
In this documentation, this file is referred to as the WebSphere MQ MQI client configuration file; its file name is generally mqclient.ini, but you can choose to give it another name. Configuration information in this file applies to all platforms, and to clients using the MQI, WebSphere MQ classes for Java™, WebSphere MQ classes for JMS, WebSphere MQ classes for .NET, and XMS.
The configuration features apply to all connections a client application makes to any queue managers, rather than being specific to an individual connection to a queue manager. Attributes relating to a connection to an individual queue manager can be configured programmatically, for example by using an MQCD structure, or by using a Client Channel Definition Table (CCDT).
Environment variables which were supported in releases of WebSphere MQ earlier than Version 7.0 continue to be supported, and where such an environment variable matches an equivalent value in the client configuration file, the environment variable overrides the client configuration file value.
For a client application using WebSphere MQ classes for JMS, you can also override the client configuration file in the following ways:
  • setting properties in the JMS configuration file
  • setting Java system properties, which also overrides the JMS configuration file
For the .NET client, you can also override the client configuration file and the equivalent environment variables using the .NET application configuration file.
Note that you cannot set up multiple channel connections using the client configuration file.

Example client configuration file

#* Module Name: mqclient.ini                                       *#
#* Type       : WebSphere MQ MQI client configuration file             *#
#  Function   : Define the configuration of a client               *#
#*                                                                 *#
#*******************************************************************#
#* Notes      :                                                    *#
#* 1) This file defines the configuration of a client              *#
#*                                                                 *#
#*******************************************************************#

ClientExitPath:
   ExitsDefaultPath=/var/mqm/exits
   ExitsDefaultPath64=/var/mqm/exits64

TCP:
   Library1=DLLName1
   KeepAlive = Yes
   ClntSndBuffSize=32768
   ClntRcvBuffSize=32768
   Connect_Timeout=0 

MessageBuffer:
   MaximumSize=-1
   Updatepercentage=-1
   PurgeTime=0

LU62:
   TPName
   Library1=DLLName1
   Library2=DLLName2

PreConnect:
 Module=amqldapi
 Function=myFunc
 Data=ldap://myLDAPServer.com:389/cn=wmq,ou=ibm,ou=com
 Sequence=1

CHANNELS:
 DefRecon=YES
 ServerConnectionParms=SALES.SVRCONN/TCP/hostname.x.com(1414)
 

No comments:

Post a Comment