Connection affinity (AFFINITY)
This attribute specifies whether client applications that connect multiple times using the same queue manager name, use the same client channel.
Use this attribute (MQIACH_CONNECTION_AFFINITY) when multiple applicable channel definitions are available.
The possible values are:
- PREFERRED
- The first connection in a process reading a client channel definition table (CCDT) creates a list of applicable definitions based on the client channel weight, with any definitions having a weight of 0 first and in alphabetical order. Each connection in the process attempts to connect using the first definition in the list. If a connection is unsuccessful the next definition is used. Unsuccessful definitions with client channel weight values other than 0 are moved to the end of the list. Definitions with a client channel weight of 0 remain at the start of the list and are selected first for each connection.
Each client process with the same host name always creates the same list.
For client applications written in C, C++, or the .NET programming framework (including fully managed .NET), and for applications that use the IBM MQ classes for Java and IBM MQ classes for JMS, the list is updated if the CCDT has been modified since the list was created.
This value is the default, and has the value of 1.
- NONE
- The first connection in a process reading a CCDT creates a list of applicable definitions. All connections in a process select an applicable definition based on the client channel weight, with any definitions having a weight of 0 selected first in alphabetical order.
For client applications written in C, C++, or the .NET programming framework (including fully managed .NET), and for applications that use the IBM MQ classes for Java and IBM MQ classes for JMS, the list is updated if the CCDT has been modified since the list was created.
This attribute is valid for the client-connection channel type only.
Parent topic: Channel attributes in alphabetical order