Connect a client to a queue sharing group

We can connect a client to a queue sharing group by creating an MQI channel between a client and a queue manager on a server that is a member of a queue sharing group.


A queue sharing group is formed by a set of queue managers that can access the same set of shared queues. For more information about shared queues, see Shared queues and queue sharing groups.

A client putting to a shared queue can connect to any member of the queue sharing group. The benefits of connecting to a queue sharing group are possible increases in front-end and back-end availability, and increased capacity. We can connect to a specific queue manager or to the generic interface.

Connect directly to a queue manager in a queue sharing group gives the benefit that we can put messages to a shared target queue, which increases back-end availability.

Connect to the generic interface of a queue sharing group opens a session with one of the queue managers in the group. This increases front-end availability, because the client queue manager can connect with any queue manager in the group. You connect to the group using the generic interface when we do not want to connect to a specific queue manager within the queue sharing group.

The generic interface can be a Sysplex Distributor VIPA address or a VTAM generic resource name, or another common interface to the queue sharing group. For more details on setting up a generic interface, see Set up communication for IBM MQ for z/OS using queue sharing groups.


Procedure

To connect to the generic interface of a queue sharing group we need to create channel definitions that can be accessed by any queue manager in the group. To do this we must have the same definitions on each queue manager in the group.

  1. Define the SVRCONN channel as shown in the following example:
    DEFINE CHANNEL(CHANNEL1) CHLTYPE(SVRCONN) TRPTYPE(TCP) +
    QSGDISP(GROUP)
    

    Channel definitions on the server are stored in a shared Db2 repository. Each queue manager in the queue sharing group makes a local copy of the definition, ensuring that we will always connect to the correct server-connection channel when we issue an MQCONN or MQCONNX call.

  2. Define the CLNTCONN channel as shown in the following example:
    DEFINE CHANNEL(CHANNEL1) CHLTYPE(CLNTCONN) TRPTYPE(TCP) +
    CONNAME( VIPA address ) QMNAME(QSG1) +
    DESCR('Client-connection to Queue Sharing Group QSG1') QSGDISP(GROUP)
    


Results

Because the generic interface of the queue sharing group is stored in the CONNAME field in the client-connection channel, we can now connect to any queue manager in the group, and put to shared queues owned by that group.

Parent topic: Configure connections between the server and client