Adding a queue manager that hosts a queue locally

Follow these instructions to add an instance of INVENTQ to provide additional capacity to run the inventory application system in Paris and New York.


Before starting

Note: For changes to a cluster to be propagated throughout the cluster, at least one full repository must always be available. Ensure that your repositories are available before starting this task. Scenario:

  • The INVENTORY cluster has been set up as described in Adding a new queue manager to a cluster. It contains three queue managers; LONDON and NEWYORK both hold full repositories, PARIS holds a partial repository. The inventory application runs on the system in New York, connected to the NEWYORK queue manager. The application is driven by the arrival of messages on the INVENTQ queue.
  • We want to add an instance of INVENTQ to provide additional capacity to run the inventory application system in Paris and New York.


Follow these steps to add a queue manager that hosts a queue locally.


Procedure

  1. Alter the PARIS queue manager.

    For the application in Paris to use the INVENTQ in Paris and the one in New York, we must inform the queue manager. On PARIS issue the following command:

    ALTER QMGR CLWLUSEQ(ANY)

  2. Review the inventory application for message affinities.

    Before proceeding, ensure that the inventory application does not have any dependencies on the sequence of processing of messages. For more information, see Handling message affinities.

  3. Install the inventory application on the system in Paris.
  4. Define the cluster queue INVENTQ.

    The INVENTQ queue which is already hosted by the NEWYORK queue manager is also to be hosted by PARIS. Define it on the PARIS queue manager as follows:

    DEFINE QLOCAL(INVENTQ) CLUSTER(INVENTORY)

    Now that we have completed all the definitions, if you have not already done so, start the channel initiator on IBM MQ for z/OS . On all platforms, start a listener program on queue manager PARIS. The listener listens for incoming network requests and starts the cluster-receiver channel when it is needed.


Results

Figure 1 shows the cluster set up by this task.

Figure 1. The INVENTORY cluster, with three queue managers

The modification to this cluster was accomplished without you altering the queue managers NEWYORK or LONDON. The full repositories in these queue managers are updated automatically with the information they need to be able to send messages to INVENTQ at PARIS.


What to do next

The INVENTQ queue and the inventory application are now hosted on two queue managers in the cluster. This increases their availability, speeds up throughput of messages, and allows the workload to be distributed between the two queue managers. Messages put to INVENTQ by any of the queue managers LONDON, NEWYORK, PARIS are routed alternately to PARIS or NEWYORK, so that the workload is balanced.

Parent topic: Use clusters for workload management


Related concepts


Related tasks