[UNIX, Linux, Windows, IBM i]

Channels stanza of the client configuration file

Use the Channels stanza to specify information about client channels.

Note: The description of each attribute of this stanza indicates which IBM® MQ clients can read that attribute. For a summary table for all IBM MQ MQI client configuration file stanzas, see Which IBM MQ attributes can be read by each client.
The following attributes can be included in the Channels stanza:
CCSID = number
The coded character set number to be used.

This attribute can be read by C, unmanaged .NET, managed .NET, and managed XMS .NET clients.

The CCSID number is equivalent to the MQCCSID environment variable.

ChannelDefinitionDirectory = path
The directory path to the file containing the client channel definition table.

This attribute can be read by C, unmanaged .NET, managed .NET, and managed XMS .NET clients.

[Windows]On Windows systems, the default is the IBM MQ data and log files directory, typically C:\ProgramData\IBM\MQ.

[AIX][Linux]On AIX® and Linux® systems, the default is /var/mqm.

ChannelDefinitionDirectory can contain a URL which works in combination with the ChannelDefinitionFile attribute (see URL access to the CCDT).

The ChannelDefinitionDirectory path is equivalent to the MQCHLLIB environment variable.

ChannelDefinitionFile = filename|AMQCLCHL.TAB
The name of the file containing the client channel definition table.

This attribute can be read by C, unmanaged .NET, managed .NET, and managed XMS .NET clients.

The client channel definition table is equivalent to the MQCHLTAB environment variable.

ReconDelay = (delay[,rand]) (delay[,rand])...
The ReconDelay attribute provides an administrative option to configure reconnect delay for client programs that can automatically reconnect.

This attribute can be read by C, unmanaged .NET, IBM MQ classes for JMS, managed .NET, and managed XMS .NET clients.

Here is an example configuration:

ReconDelay=(1000,200)(2000,200)(4000,1000)
The example shown defines an initial delay of one second, plus a random interval of up to 200 milliseconds. The next delay is two seconds plus a random interval of up to 200 milliseconds. All subsequent delays are four seconds, plus a random interval of up to 1000 milliseconds.
DefRecon = NO|YES|QMGR |DISABLED
The DefRecon attribute provides an administrative option to enable client programs to automatically reconnect, or to disable the automatic reconnection of a client program that has been written to reconnect automatically. You might opt to set the latter if a program uses an option, such as MQPMO_LOGICAL_ORDER, that is incompatible with reconnection.

This attribute can be read by C, unmanaged .NET, IBM MQ classes for JMS, managed .NET, and managed XMS .NET clients.

Automatic client reconnection is not supported by IBM MQ classes for Java.

Automatic client reconnection usually depends on two values which are the:
  • Reconnect option set in the application MQCONNX (or JMS Connection Factory)
  • Default reconnect option supplied in any client connection definition in use (MQCD structure, for example supplied using a CCDT file).
The mqclient.ini file attribute applies only if there is no channel definition being used that sets the DefReconnect attribute and in that situation behaves as though one had been supplied. The channel DefReconnect attribute (and therefore this attribute, if applicable):
  • Override the application code if either is set to DISABLED
  • Are overridden by the application code in all other cases, if the options are specified on MQCONNX
See the description of DEFRECON for a table showing all possible combinations of application and channel definition supplied values.
Notes:
  • If an MQCD is in use but predates MQCD_VERSION_10, the DefReconnnect parameter is not part of the structure. In this situation, the value of that missing parameter is populated with the mqclient.ini file DefReconnnect value if one is specified. This can occur, for example, if a binary format CCDT generated in an older version of IBM MQ is still in use by a client application.
  • When interpreted by the IBM MQ client code, a JSON CCDT, see Configuring a JSON format CCDT, always generates MQCD structures at the latest version, and therefore always supplies the default value (NO) for this attribute unless explicitly present with a different value.
MQReconnectTimeout

The maximum time, in seconds, that the automatic client reconnect function in a client tries to reestablish the connection. The default value is 1800 seconds (30 minutes).

This attribute can be read by C and unmanaged .NET clients, and managed .NET clients.

IBM MQ classes for JMS clients can specify a timeout to reconnect using the connection factory property CLIENTRECONNECTTIMEOUT. The default value for this property is 1800 seconds (30 minutes).

IBM MQ classes for XMS .NET clients can specify a timeout to reconnect using the following properties:
  • The connection factory property CLIENTRECONNECTTIMEOUT. The default value for this property is 1800 seconds (30 minutes). This property is valid only for Managed mode.
  • The property XMSC.WMQ_CLIENT_RECONNECT_TIMEOUT. The default value for this property is 1800 seconds (30 minutes). This property is valid only for Managed mode.
ServerConnectionParms
ServerConnectionParms is equivalent to the MQSERVER environment variable and specifies the location of the IBM MQ server and the communication method to be used.

This attribute can be read by C, unmanaged .NET, managed .NET, and managed XMS .NET clients.

The ServerConnectionParms attribute defines only a simple channel; you cannot use it to define a TLS channel or a channel with channel exits. It is a string of the format ChannelName/TransportType/ConnectionName, ConnectionName must be a fully qualified network name. ChannelName cannot contain the forward slash (/) character because this character is used to separate the channel name, transport type, and connection name.

When ServerConnectionParms is used to define a client channel, a maximum message length of 100 MB is used. Therefore the maximum message size in effect for the channel is the value specified in the SVRCONN channel on the server.
Note that only a single client channel connection can be made. For example, if you have two entries:

ServerConnectionParms=R1.SVRCONN/TCP/localhost(1963)
ServerConnectionParms=R2.SVRCONN/TCP/localhost(1863)
only the second one is used.

Specify ConnectionName as a comma-separated list of names for the stated transport type. Generally, only one name is required. You can provide multiple hostnames to configure multiple connections with the same properties. The connections are tried in the order that they are specified in the connection list until a connection is successfully established. If no connection is successful, the client starts to process again. Connection lists are an alternative to queue manager groups to configure connections for reconnectable clients.

Put1DefaultAlwaysSync = NO (default) | YES
Controls the behavior of the MQPUT1 function call with the option MQPMO_RESPONSE_AS_Q_DEF.

This attribute can be read by C, unmanaged .NET, IBM MQ classes for Java, IBM MQ classes for JMS, managed .NET, and managed XMS .NET clients.

NO
If MQPUT1 is set with MQPMO_SYNCPOINT, it behaves as MQPMO_ASYNC_RESPONSE. Similarly, if MQPUT1 is set with MQPMO_NO_SYNCPOINT, it behaves as MQPMO_SYNC_RESPONSE. This is the default value.
YES
MQPUT1 behaves as if MQPMO_SYNC_RESPONSE is set, regardless of whether MQPMO_SYNCPOINT or MQPMO_NO_SYNCPOINT is set.
PasswordProtection = Compatible (default) |always|optional

From IBM MQ 8.0, authentication credentials that IBM MQ client applications specify when they connect to a queue manager can be protected by using the IBM MQ MQCSP password protection feature, if the connection does not use TLS encryption.

This attribute can be read by C, unmanaged .NET, IBM MQ classes for Java, IBM MQ classes for JMS, managed .NET, and managed XMS .NET clients.

MQCSP password protection is useful for test and development purposes as using MQCSP password protection is simpler than setting up TLS encryption, but not as secure.

For more information about protecting credentials in the MQCSP structure, and the values that can be set for this attribute, see MQCSP password protection.