Publication scope

When you configure a publish/subscribe cluster or hierarchy, the scope of a publication further controls whether queue managers forward a publication to remote queue managers. Use the PUBSCOPE topic attribute to administer the scope of publications.

If a publication is not forwarded to remote queue managers, only local subscribers receive the publication.

When you use a publish/subscribe cluster, the scope of publications is primarily controlled by the definition of clustered topic objects at certain points in the topic tree. Publication scope must be set to allow the flow of publications to other queue managers in the cluster. You should only restrict publication scope for a clustered topic when you need fine-grain control of specific topics on certain queue managers.

When you use a publish/subscribe hierarchy, the scope of publications is primarily controlled by this attribute in combination with the subscription scope attribute.

The PUBSCOPE attribute is used to determine the scope of publications made to a specific topic. You can set the attribute to one of the following values:

QMGR
The publication is delivered only to local subscribers. These publications are called local publications. Local publications are not forwarded to remote queue managers and therefore are not received by subscribers connected to remote queue managers.
ALL
The publication is delivered to local subscribers and subscribers connected to remote queue managers in a publish/subscribe cluster or hierarchy. These publications are called global publications.
ASPARENT
Use the PUBSCOPE setting of the parent topic in the topic tree.

Publishers can also specify whether a publication is local or global using the MQPMO_SCOPE_QMGR put message option. If this option is used, it overrides any behavior that has been set using the PUBSCOPE topic attribute.