+

Search Tips | Advanced Search

What the MQCONN examples demonstrate

The examples demonstrate the use of multiple queue managers as a backup system.

Suppose the communication link to Server 1 is temporarily broken. The use of multiple queue managers as a backup system is demonstrated.

Each example covers a different MQCONN call and gives an explanation of what happens in the specific example presented, by applying the following rules:
  1. The client channel definition table (CCDT) is scanned in alphabetical channel name order for a queue manager name (QMNAME field) corresponding to the one given in the MQCONN call.
  2. If a match is found, the channel definition is used.
  3. An attempt is made to start the channel to the machine identified by the connection name (CONNAME). If this is successful, the application continues. It requires:

    • A listener to be running on the server.
    • The listener to be connected to the same queue manager as the one the client wants to connect to (if specified).

  4. If the attempt to start the channel fails and there is more than one entry in the client channel definition table (in this example there are two entries), the file is searched for a further match. If a match is found, processing continues at step 1.
  5. If no match is found, or there are no more entries in the client channel definition table and the channel has failed to start, the application is unable to connect. An appropriate reason code and completion code are returned in the MQCONN call. The application can take action based on the reason and completion codes returned.

Parent topic: Examples of MQCONN calls

Last updated: 2020-10-04