Example 1. Queue manager name includes an asterisk (*)
In this example the application is not concerned about which queue manager it connects to. The application issues an MQCONN call for a queue manager name including an asterisk. A suitable channel is chosen.
The application issues:
MQCONN (*SALE)
Following the rules, this is what happens in this instance:
- The client channel definition table (CCDT) is scanned for the queue manager name
SALE
, matching with the application MQCONN call. - Channel definitions for
ALPHA
andBETA
are found. - If one channel has a CLNTWGHT value of 0, this channel is selected. If both have a CLNTWGHT value of 0, channel
ALPHA
is selected because it is first in alphabetical sequence. If both channels have a non-zero CLNTWGHT value, one channel is randomly selected, based on its weighting. - An attempt to start the channel is made.
- If channel
BETA
was selected, the attempt to start it is successful. - If channel
ALPHA
was selected, the attempt to start it is NOT successful because the communication link is broken. The following steps then apply:- The only other channel for the queue manager name
SALE
isBETA
. - An attempt to start this channel is made - this is successful.
- The only other channel for the queue manager name
- A check to see that a listener is running shows that there is one running. It is not connected to the
SALE
queue manager, but because the MQI call parameter has an asterisk (*) included in it, no check is made. The application is connected to theSALE_BACKUP
queue manager and continues processing.