Configuration files for IBM MQ classes for .NET
A .NET client application can use an IBM MQ MQI client configuration file and, if we are using the managed connection type, a .NET application configuration file. Settings in the application configuration file have priority.
Client configuration file
An IBM MQ classes for .NET client application can use a client configuration file in the same way as any other IBM MQ MQI client. This file is typically called mqclient.ini, but we can specify a different file name. For more information about the client configuration file, see Configure a client using a configuration file.
Only the following attributes in an IBM MQ MQI client configuration file are relevant to IBM MQ classes for .NET. If you specify other attributes, it has no effect.Stanza | Attribute |
---|---|
CHANNELS | CCSID |
CHANNELS | ChannelDefinitionDirectory |
CHANNELS | ChannelDefinitionFile |
CHANNELS | ReconDelay |
CHANNELS | DefRecon |
CHANNELS | MQReconnectTimeout |
CHANNELS | ServerConnectionParms |
CHANNELS | Put1DefaultAlwaysSync |
CHANNELS | PasswordProtection |
ClientExitPath | ExitsDefaultPath |
ClientExitPath | ExitsDefaultPath64 |
MessageBuffer | MaximumSize |
MessageBuffer | PurgeTime |
MessageBuffer | UpdatePercentage |
TCP | ClntRcvBufSize |
TCP | ClntSndBufSize |
TCP | IPAddressVersion |
TCP | KeepAlive |
Application configuration file
If we are running with the managed connection type, we can also override the IBM MQ client configuration file and the equivalent environment variables using the .NET application configuration file.
The .NET application configuration file settings are only acted upon when running with the managed connection type, and are ignored for other connection types.
The .NET application configuration file and its format are defined by Microsoft for general use within the .NET framework, but the particular section names, keys and values mentioned in this documentation are specific to IBM MQ.
The format of the .NET application configuration file is a number of sections. Each section contains one or more keys, and each key has an associated value. The following example shows the sections, keys, and values used in a .NET application configuration file to control the TCP/IP KeepAlive property:<configuration> <configSections> <section name="TCP" type="System.Configuration.NameValueSectionHandler"/> </configSections> <TCP> <add key="KeepAlive" value="true"></add> </TCP> <configuration>The keywords used in the .NET application configuration file section names and keys exactly match the keywords for the stanzas and attributes defined in the client configuration file.
The section <configSections> must be the first child element of the <configuration> element.
See your Microsoft documentation for further information.
Parent topic: Writing and deploying IBM MQ .NET programs