[UNIX, Linux, Windows, IBM i]

TCP stanza of the client configuration file

Use the TCP stanza to specify TCP network protocol configuration parameters.

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 TCP stanza:

ClntRcvBuffSize = number|0
The size in bytes of the TCP/IP receive buffer used by the client end of a client-connection server-connection channel.

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

If no value is set, then the IBM MQ default, 32768, is used.

If the value is set as zero, the operating system defaults are used. A value of zero indicates that the operating system will manage the buffer sizes, as opposed to the buffer sizes being fixed by IBM MQ.

[MQ 9.3.0.30 Jun 2025]From IBM MQ 9.3.0 Fix Pack 30, if the value is set as zero for an IBM MQ Java client, the Java Message Queuing Interface (JMQI) uses the buffer size provided by the network layer. This resolves a previous issue where setting the property to zero would incorrectly result in the JMQI using TCP/IP receive buffers of size 32K when communicating with a queue manager. The receive buffer size is written to a JMSCS0062 message in the IBM MQ classes for Java, IBM MQ classes for JMS, or IBM MQ classes for Jakarta Messaging log file.

ClntSndBuffSize = number|0
The size in bytes of the TCP/IP send buffer used by the client end of a client-connection server-connection channel.

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

If no value is set, then the IBM MQ default, 32768, is used.

If the value is set as zero, the operating system defaults are used. A value of zero indicates that the operating system will manage the buffer sizes, as opposed to the buffer sizes being fixed by IBM MQ.

[MQ 9.3.0.30 Jun 2025]From IBM MQ 9.3.0 Fix Pack 30, if the value is set as zero for an IBM MQ Java client, the Java Message Queuing Interface (JMQI) uses the buffer size provided by the network layer. This resolves a previous issue where setting the property to zero would incorrectly result in the JMQI using TCP/IP send buffers of size 32K when communicating with a queue manager. The send buffer size is written to a JMSCS0061 message in the IBM MQ classes for Java, IBM MQ classes for JMS, or IBM MQ classes for Jakarta Messaging log file.

Connect_Timeout = number
The number of seconds before an attempt to connect the socket times out.

If ConnectTimeout = 0, and SOCK_NONBLOCK is issued before an asynchronous connect() call, the call is non-blocked. The default timeout value of 20 seconds (CONNECT_WAIT_MAX) is applicable for checking connect status.

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

IBM MQ channel processes connect over nonblocking sockets. Therefore, if the other end of the socket is not ready, connect() returns immediately with EINPROGRESS or EWOULDBLOCK. Following this, there is no attempt to reconnect.

If Connect_Timeout is set to a non-zero value, IBM MQ waits for the stipulated period over select() call for the socket to get ready. This increases the chances of success of a subsequent connect() call. This option might be beneficial in situations where connects would require some waiting period, due to high load on the network.

There is no relationship between the Connect_Timeout, ClntSndBuffSize, and ClntRcvBuffSize parameters.

IPAddressVersion = MQIPADDR_IPV4|MQIPADDR_IPV6
Specifies which IP protocol to use for a channel connection.

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

It has the possible string values of MQIPADDR_IPV4 or MQIPADDR_IPV6. These values have the same meanings as IPV4 and IPV6 in ALTER QMGR IPADDRV and the MQIPADDRV environment variable.

KeepAlive = YES|NO
Switch the KeepAlive function on or off. KeepAlive=YES causes TCP/IP to check periodically that the other end of the connection is still available. If it is not, the channel is closed.

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.

[Windows]Library1 = DLLName|WSOCK32
[Windows]( Windows only) The name of the TCP/IP sockets DLL.

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

[MQ 9.3.0.30 Jun 2025]DNSResolutionOrder=list|IPV6,IPV4,ANY(default)
The order in which IBM MQ looks up host names in mixed IPv6 and IPv4 environments. If the AMQ_NO_IPV6 environment variable is set, IBM MQ acts as if DNSResolutionOrder=IPV4 is set, no matter what value is configured.
The value of DNSResolutionOrder is a comma-separated list with the values IPV6, IPV4, and ANY in the order preferred. These values correspond to IPv6, IPv4 and unspecified address family DNS lookups, where an unspecified lookup can resolve both IPv6 and IPv4 addresses. Each value can appear in the list at most once. If IPV4 or IPV6 are missing from the list, IBM MQ implicitly appends ANY to make sure it can resolve all address types.
Setting the list value to just ANY might give faster performance. IPV6 and IPV4 can be listed in the order reflecting their importance on the local network.