+

Search Tips | Advanced Search

Subscription performance in publish/subscribe networks

Distributed publish/subscribe in IBM MQ works by propagating knowledge of where subscriptions to different topic strings have been created in the queue manager network. This enables the queue manager on which a message is published to identify which other queue managers require a copy of the published message, to match their subscriptions.

This approach minimizes the sending of published messages to queue managers on which no matching subscriptions exist. However, the propagation of the subscription knowledge can become a significant overhead, when the number of topic strings being subscribed to is high and constantly changing through frequent subscription creation and deletion.

We can affect performance by adjusting how publications and subscriptions are flowed around your publish/subscribe network. If your network traffic has few publications, and rapid subscription creation, deletion, or change, we can stop subscription information being flowed to all queue managers, and instead forward all publications to all queue managers in the network. We can also restrict the flow of proxy subscriptions and publications for a given topic between connected queue managers, restrict the flow of proxy subscriptions containing wildcards, and reduce the number and transient nature of topic strings.


Individual subscription propagation and publish everywhere

Publish everywhere is an alternative to individual subscription propagation. With individual propagation, only publications that have a matching subscription on a queue manager are forwarded to that queue manager. With publish everywhere, all publications are forwarded to all queue managers in the network. The receiving queue managers then deliver those publications that match local subscriptions.

You should consider using the publish everywhere mechanism when you expect a publication to be subscribed to from a significant proportion of your queue managers, or where the proxy subscription overheads are too great because of the frequency of subscription changes. You should use individual proxy subscription forwarding in cases where you experience increased messaging traffic when publications are sent to all queue managers, rather than to the queue managers with matching subscriptions.

We can set publish everywhere behavior at any level within the topic tree. To enable publish everywhere, you set the PROXYSUB parameter to FORCE for a high-level topic object. This results in a single wildcard proxy subscription that matches all topics below this topic object in the topic tree. When set it on a clustered topic object, the PROXYSUB(FORCE) attribute is propagated to every queue manager in the network, not just the queue manager that the topic was defined on.

Note: When used in a hierarchy, you set PROXYSUB(FORCE) individually on each queue manager, so the topology mechanism naturally limits the number of channels. However, when used in a cluster, many additional channels might be started:

The overhead of starting many channels is most pronounced in a direct routed cluster, and can cause performance issues. See Direct routed publish/subscribe cluster performance.


Other ways of restricting the flow of proxy subscriptions and publications between connected queue managers

See also Balancing producers and consumers in publish/subscribe networks


Monitor proxy subscription traffic in clusters

When considering the load on the system from the proxy subscription traffic, in addition to monitoring the queues listed inBalancing producers and consumers in publish/subscribe networks, monitor the following cluster queues:

Any significant message backlog on these queues implies that either the rate of subscription change is too great for the system, or a queue manager is not correctly functioning in the cluster. If you suspect the problem lies with a specific queue manager, check that publish/subscribe support is not disabled for that queue manager. See PSMODE in ALTER QMGR.