Publishing and subscribing to topic spaces in multiple clusters
Publish and subscribe to topics in multiple clusters using overlapped clusters. We can use this technique as long as the topic spaces in the clusters do not overlap.
Before you begin
Create multiple traditional clusters with some queue managers in the intersections between the clusters.
You might have chosen to overlap clusters for various different reasons.
- You have a limited number of high availability servers, or queue managers. You decide to deploy all the cluster repositories, and cluster topic hosts to them.
- You have existing traditional queue manager clusters that are connected using gateway queue managers. You want to deploy publish/subscribe applications to the same cluster topology.
- You have a several self contained publish/subscribe applications. For performance reasons, it is better to keep publish/subscribe clusters small and separate from traditional clusters. You have decided to deploy the applications to different clusters. However, you also want to monitor all the publish/subscribe applications on one queue manager, as we have licensed only one copy of the monitoring application. This queue manager must have access to the publications to cluster topics in all the clusters.
By ensuring that your topics are defined in non-overlapping topic spaces, we can deploy the topics into overlapping publish/subscribe clusters, see Figure 1. If the topic spaces overlap, then deploying to overlapping clusters leads to problems.
Because the publish/subscribe clusters overlap we can publish and subscribe to any of the topic spaces using the queue managers in the overlap.Procedure
Create a means of ensuring that topic spaces do not overlap. For example, define a unique root topic for each of the topic spaces. Make the root topics cluster topics.- DEFINE TOPIC(B) TOPICSTR('B') CLUSTER('CLUSTER 1') ...
- DEFINE TOPIC(C) TOPICSTR('C') CLUSTER('CLUSTER 2') ...
Example
In Figure 1 publishers and subscriber connected to QM3 can publish or subscribe to T B or T CWhat to do next
Connect publishers and subscribers that use topics in both clusters to queue managers in the overlap.
Connect publishers and subscribers that must only use topics in a specific cluster to queue managers not in the overlap.