IBM MQ 7.5 was EOS 30th April 2018.Click EOS notice for more details
Overlapping cluster support, and publish/subscribe
With IBM®WebSphere® MQ clusters,
a single queue manager can be a member of more than one cluster. This
arrangement is known as overlapping clusters. Clustered topics in
a publish/subscribe clusters behave differently to queues when clusters
are overlapped in a queue manager. This behavior must be clearly understood
when using clustered publish/subscribe with overlapping clusters.
Unlike for a queue, there is no ability to associate a topic definition
with more than one cluster. Therefore, the scope of proxy subscriptions
created in a cluster is limited to the single cluster in which the
clustered topic is defined. However, each queue manager has a single
topic tree which includes all local topics and any known clustered
topics, from any cluster that they are a member of. For this reason
it is possible to architect such a system where publish/subscribe
behaviour can be hard to understand.
Integrating multiple publish/subscribe clusters
For point-to-point messages, a reason for making a single queue
manager a member of more than one cluster is to create a cluster gateway
between two clusters. For more information about this subject, see Overlapping clusters
. This cluster gateway enables point-to-point
messages originating in one cluster to be routed to queries in another
cluster. Publish/subscribe clusters inherit the capability of being
overlapped from traditional queue manager clusters. However, you cannot
use this mechanism to route publications and subscriptions from one
cluster to another.
Instead, to pass publications and subscriptions from queue managers
in one cluster to another, you must link the queue managers together
using a publish/subscribe hierarchy. This arrangement can be achieved
by explicitly creating a parent-child hierarchical relationship between
one queue manager in one cluster with another queue manager in the
other cluster. This relationship enables the flow of all proxy subscriptions
between the clusters, and thus any matching publications. For more
information about this relationship, see Publish/subscribe hierarchies.
Each queue manager has a single Topic
tree that includes local topics and all known clustered topics.
A further consideration with overlapping two clusters, both using
publish/subscribe, is that it is possible for a queue manager in each
cluster to define a clustered topic with the same name, or to define
differently named clustered topics which have the same topic string.
On the queue managers that are members of both clusters, conflicts
arise when they are informed of the multiple cluster topic definitions,
one for each cluster. A problem is reported by the queue manager but
the queue manager continues to operate, using only the most recent
clustered topic definition. Therefore the behavior becomes nondeterministic
and cannot be relied upon.
For this reason, overlapping clusters that are using clustered
publish/subscribe must consider their topic definition namespace to
span all clusters, and name their topic objects and structure their
topic strings accordingly. You can then use queue managers in the
overlap to publish and subscribe to both clusters predictably.
In Figure 1, TB and
TC are topic definitions that do not overlap. A publisher
connected to QM3, in the cluster overlap, is
able to publish to both topics in their respective clusters. A subscriber
connected to QM3 in the overlap is able to subscribe
to topics in both clusters.
An alternative way of thinking about Figure 1 is
to consider the proxy subscriptions. An application connected to queue
manager QM3, subscribing on a topic that resolves
to topic object TB (which exists only in CLUSTER
1) results in proxy subscriptions being sent from queue
manager QM3 to queue managers QM1 and QM2 only.
An application connected to queue manager QM3 subscribes
on a topic that resolves to topic object TC (which exists
only in the CLUSTER 2). The subscription results
in proxy subscriptions being sent from queue manager QM3 to
queue managers QM4 and QM5 only.
Figure 1. Overlapping clusters:
two clusters each subscribing to different topics
Publishers and subscribers to queue managers that are not in the
overlap can publish and subscribe to topics in their cluster only,
for example a subscriber to a topic string on QM2 do
not receive messages published to the same topic string published
from QM5, irrespective of clustering the topics.
To achieve this arrangement, a publish/subscribe hierarchy is required.
Overlapping clusters, wildcarded subscriptions
For the reasons in the previous section of this topic, care must
be taken when using wildcards to subscribe to topics on a queue manager
that is a member of multiple clusters.
In the previous example, assume that the two topic objects were
configured as:
TB: Topic name 'Football', cluster 'CLUSTER1'. topic
string '/Sport/Football'
TC: Topic name 'Tennis', cluster 'CLUSTER2'. topic
string '/Sport/Tennis'
In this scenario, the two clustered topics are clearly separate,
with no overlap in either the topic name or the topic string.
An application connected to QM3 can create
a subscription to '/Sport/Football' and a subscription
to '/Sport/Tennis'. They would then receive any
publications from across the two clusters. However, as described in Administrative topic objects, if they were to subscribe to '/Sport/#',
with the intent of receiving publications on both '/Sport/Football' and '/Sport/Tennis',
this model is not recognized as a clustered topic in either cluster
and therefore no proxy subscriptions would be created. They would
then miss publications from other queue managers in either cluster.
As already described, it is not valid to create a clustered topic
for '/Sport/#' in both CLUSTER 1 and CLUSTER
2, because these clustered topics would conflict and informational
messages are written to the error logs to indicate this. However,
it is 'allowed' to create such a topic in just one of the clusters,
say CLUSTER 1. Now a subscription to '/Sport/#' in QM3 would
result in proxy subscriptions being sent to the queue managers in
CLUSTER 1 only, so still, publications to '/Sport/Tennis' from QM4 or QM5 would
still fail to be received.
The only solution in this scenario is to continue to create two
separate subscriptions.