Add extra topic hosts to a topic host routed cluster

In a topic host routed publish/subscribe cluster, multiple queue managers can be used to route publications to subscriptions by defining the same clustered topic object on those queue managers. This can be used to improve availability and workload balancing. When you add an extra topic host for the same cluster topic object, we can use the PUB parameter to control when publications begin to be routed through the new topic host.


Before you begin

Defining the same cluster topic object on several queue managers is only functionally useful for a topic host routed cluster. Defining multiple matching topics in a direct routed cluster does not change its behavior. This task only applies to topic host routed clusters.

This task assumes that we have read the article Multiple cluster topic definitions of the same name, especially the following sections:


When a queue manager is made a routed topic host, it must first learn of the existence of all related topics that have been subscribed to in the cluster. If publications are being published to those topics at the time that an additional topic host is added, and a publication is routed to the new host before that host has learned of the existence of subscriptions on other queue managers in the cluster, then the new host does not forward that publication to those subscriptions. This causes subscriptions to miss publications.

Publications are not routed through topic host queue managers that have explicitly set the cluster topic object PUB parameter to DISABLED, so we can use this setting to ensure that no subscriptions miss publications during the process of adding an extra topic host.

Note: While a queue manager hosts a cluster topic that has been defined as PUB(DISABLED), publishers connected to that queue manager cannot publish messages, and matching subscriptions on that queue manager do not receive publications published on other queue managers in the cluster. For this reason, careful consideration must be given to defining topic host routed topics on queue managers where subscriptions exist and publishing applications connect.


Procedure

  1. Configure a new topic host, and initially define the new topic host as PUB(DISABLED).

    This allows the new topic host to learn of the subscriptions in the cluster, but not to start routing publications.

    For information about configuring a topic host, see Configure a publish/subscribe cluster.

  2. Determine when the new topic host has learned of all subscriptions.

    To do this, compare the proxy subscriptions known to the new topic host and those known to the existing topic host. One way to view the proxy subscriptions is to issue the following runmqsc command: DISPLAY SUB(*) SUBTYPE(PROXY)

  3. Redefine the new topic host as PUB(ENABLED).

    After the new topic host has learned of all subscriptions on other queue managers, the topic can start routing publications.