[UNIX, Linux, Windows, IBM i]

TCP stanza of the qm.ini file

The TCP stanza specifies Transmission Control Protocol/Internet Protocol (TCP/IP) configuration parameters. These parameters override the default attributes for channels.

Use the TCP stanza in the qm.ini file, to specify TCP/IP configuration parameters.

[Windows][Linux]Alternatively, on Linux® (x86 and x86-64) and Windows, use the IBM® MQ Explorer SPX TCP queue manager properties page.

Port= 1414 (default) | port_number
The default port number, in decimal notation, for TCP/IP sessions. The well known port number for IBM MQ is 1414.
[Windows]Library1= DLLName1 (Windows only)
The name of the TCP/IP sockets DLL.

The default is WSOCK32.

KeepAlive= NO (default) |YES
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.
ListenerBacklog=number
Override the default number of outstanding requests for the TCP/IP listener.
When receiving on TCP/IP, a maximum number of outstanding connection requests is set. This can be considered to be a backlog of requests waiting on the TCP/IP port for the listener to accept the request. The default listener backlog values are shown in Table 1.
Table 1. Default outstanding connection requests (TCP)
Platform Default ListenerBacklog value
[Windows]Windows Server 100
[Linux]Linux 100
[Solaris]Solaris 100
[AIX]AIX® V5.3 or later 100
Note: Some operating systems support a larger value than the default shown. Use this to avoid reaching the connection limit.

Conversely, some operating systems might limit the size of the TCP backlog, so the effective TCP backlog could be smaller than requested here.

If the backlog reaches the values shown in Table 1, the TCP/IP connection is rejected and the channel cannot start. For message channels, this results in the channel going into a RETRY state and retrying the connection at a later time. For client connections, the client receives an MQRC_Q_MGR_NOT_AVAILABLE reason code from MQCONN and retries the connection at a later time.

The following group of properties can be used to control the size of buffers used by TCP/IP. The values are passed directly to the TCP/IP layer of the operating system. Great care should be taken when using these properties. If the values are set incorrectly it can adversely affect the TCP/IP performance. For further information about how this affects performance refer to the TCP/IP documentation for your environment. 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.

Connect_Timeout= 0 (default) |number
The number of seconds before an attempt to connect the socket times out. The default value of zero specifies that there is no connect timeout.

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, connect will be attempted again, up to a total of 20 such attempts, when a communications error is reported.

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.

SndBuffSize=number|0 (default)
The size in bytes of the TCP/IP send buffer used by the sending end of channels. This stanza value can be overridden by a stanza more specific to the channel type, for example RcvSndBuffSize. If the value is set as zero, the operating system defaults are used. If no value is set, then the IBM MQ default, 32768, is used.
[UNIX, Linux, Windows, IBM i]From IBM MQ 8.0, new queue managers are automatically created with a default setting of 0 (see Example stanza.
RcvBuffSize=number|0 (default)
The size in bytes of the TCP/IP receive buffer used by the receiving end of channels. This stanza value can be overridden by a stanza more specific to the channel type, for example RcvRcvBuffSize. If the value is set as zero, the operating system defaults are used. If no value is set, then the IBM MQ default, 32768, is used.
[UNIX, Linux, Windows, IBM i]From IBM MQ 8.0, new queue managers are automatically created with a default setting of 0 (see Example stanza.
RcvSndBuffSize=number|0 (default)
The size in bytes of the TCP/IP send buffer used by the sender end of a receiver channel. If the value is set as zero, the operating system defaults are used. If no value is set, then the IBM MQ default, 32768, is used.
[UNIX, Linux, Windows, IBM i]From IBM MQ 8.0, new queue managers are automatically created with a default setting of 0 (see Example stanza.
RcvRcvBuffSize=number|0 (default)
The size in bytes of the TCP/IP receive buffer used by the receiving end of a receiver channel. If the value is set as zero, the operating system defaults are used. If no value is set, then the IBM MQ default, 32768, is used.
[UNIX, Linux, Windows, IBM i]From IBM MQ 8.0, new queue managers are automatically created with a default setting of 0 (see Example stanza.
SvrSndBuffSize=number|0 (default)
The size in bytes of the TCP/IP send buffer used by the server end of a client-connection server-connection channel. If the value is set as zero, the operating system defaults are used. If no value is set, then the IBM MQ default, 32768, is used.
[UNIX, Linux, Windows, IBM i]From IBM MQ 8.0, new queue managers are automatically created with a default setting of 0 (see Example stanza.
SvrRcvBuffSize=number|0 (default)
The size in bytes of the TCP/IP receive buffer used by the server end of a client-connection server-connection channel. If the value is set as zero, the operating system defaults are used. If no value is set, then the IBM MQ default, 32768, is used.
[UNIX, Linux, Windows, IBM i]From IBM MQ 8.0, new queue managers are automatically created with a default setting of 0 (see Example stanza).

Example stanza


 TCP:
   SndBuffSize=0
   RcvBuffSize=0
   RcvSndBuffSize=0
   RcvRcvBuffSize=0
   ClntSndBuffSize=0
   ClntRcvBuffSize=0
   SvrSndBuffSize=0
   SvrRcvBuffSize=0
 
[UNIX, Linux, Windows, IBM i]Note: For new queue managers on Multiplatforms, the default TCP send and receive buffer sizes in the TCP stanza of the qm.ini file are set to be managed by the operating system. As shown in the preceding example, new queue managers are automatically created with a default setting of 0 for the send and receive buffers. This applies to new queue managers only. The TCP send and receive buffer settings for queue managers that are migrated from earlier versions of IBM MQ are retained.

If the TCP buffer size properties are removed from the qm.ini file, then the default buffer is set to 32K. You should exercise caution when using this default as 32K might not be an appropriate buffer for all messaging scenarios.

If the TCP send and receive buffer properties are set to zero, then the OS default values are used. The method for choosing these defaults will vary by operating system but can typically be found in the "tcp" or get/setsockopt() OS manual pages.