+

Search Tips | Advanced Search

Cluster topics

Topics can be clustered in a similar manner to cluster queues, although an individual topic object can be a member of only one cluster. A topic is made into a cluster topic by defining, on the topic object, the name of the cluster that is to host the topic, and the cluster routing mechanism to use for publications on this topic.

There are two options for routing publications across a publish/subscribe cluster: direct routing and topic host routing. To choose the message routing to use within the cluster, you set the CLROUTE property on the administered topic object to one of the following values:

  • DIRECT
  • TOPICHOST

By default, topic routing is DIRECT. This was the only option prior to IBM MQ Version 8.0. When you configure a direct routed clustered topic on a queue manager, all queue managers in the cluster become aware of all other queue managers in the cluster. When performing publish and subscribe operations, each queue manager then connects directly to all the others.

From IBM MQ Version 8.0, we can instead configure topic routing as TOPICHOST. When we use topic host routing, all queue managers in the cluster become aware of the cluster queue managers that host the routed topic definitions. When performing publish and subscribe operations, queue managers in the cluster connect only to these topic host queue managers, and not directly to each other. The topic host queue managers are responsible for routing publications from queue managers on which publications are published to queue managers with matching subscriptions.

A topic host routed publish/subscribe cluster provides the following benefits:

  • Improved scalability of larger clusters. Only the topic host queue managers need to be able to connect to all other queue managers in the cluster. Therefore, there are fewer channels between queue managers, and there is less inter-queue manager publish/subscribe administrative traffic than for direct routing. When subscriptions change on a queue manager, only the topic host queue managers need to be informed.
  • More control over the physical configuration. With direct routing, all queue managers assume all roles, and therefore all need to be equally capable. With topic host routing, you explicitly choose the topic host queue managers. Therefore, we can ensure that those queue managers are running on adequate equipment, and we can use less powerful systems for the other queue managers.


The effect of defining a local topic as well as a cluster topic

You define a local topic object if we want publisher applications connected to a queue manager to publish only to locally connected subscribers. A local definition of a topic always overrides any clustered topic definitions on remote queue managers.

Note: You also need to specify a Publication scope of Queue manager on the local topic object. If Publication scope resolves to All, then remote subscribers are also sent publications published to the topic defined on this queue manager.


Multiple cluster topic definitions in a direct routed cluster

In a direct routed cluster, you do not usually define a cluster topic on more than one cluster queue manager. This is because direct routing makes the topic available at all queue managers in the cluster.

It is also not essential that the sole host queue manager is continually available, because the cluster topic definition is cached by the full repository queue managers and by all other queue managers in their partial cluster repositories. This caching allows for at least 60 days of availability while the host queue manager is unavailable.

For to alter a cluster topic definition, take care to modify it at the same queue manager it was defined on.


Multiple cluster topic definitions in a topic host routed cluster

In a topic host routed cluster, all publish/subscribe messaging is routed through the topic hosts. Therefore, to ensure scalability and availability, it is usual to define a cluster topic on more than one queue manager, and for the multiple cluster topic definitions to be identical.

Parent topic: Objects in IBM MQ Explorer


Related concepts


Related reference

Last updated: 2020-10-04