Subscription Scopes

Subscription scope answers: “On which queue managers should this subscription be known?” IBM MQ publish/subscribe in a cluster must align three ideas—the publisher’s effective publication scope (PUBSCOPE on topics), the topic’s cluster definition (TOPTYPE CLUS), and the subscriber’s SUBSCOPE on DEFINE SUB. A durable subscription with perfect TOPICSTR and healthy DEST queues still receives nothing from remote publishers when SUBSCOPE(QMGR) keeps interest invisible outside the local queue manager. Conversely, SUBSCOPE(ALL) on a high-rate wildcard pattern can amplify cross-site traffic and fill subscriber queues on every cluster member. This tutorial explains SUBSCOPE values, pairing with PUBSCOPE, administrative defaults ASPARENT, cluster repository visibility, security implications, ALTER SUB scope changes, troubleshooting matrices, and design guidance for single-site versus multi-site beginners.

SUBSCOPE Values

SUBSCOPE on DEFINE SUB (verify IBM MQ 9.3 attribute table)
ValueTypical behaviorWhen to use
QMGRSubscription registered only on local queue managerSingle-QM apps, strict data residency, local-only monitoring
ALLSubscription advertised cluster-wide per IBM rulesCentral analytics on QM2 consuming events published on QM1
ASPARENTInherit from administrative topic parentStandardize domain under CLUS parent with SUBSCOPE ALL
Mismatch with PUBSCOPEPublish cannot reach remote subs or vice versaIncident root cause—fix in architecture review

PUBSCOPE and SUBSCOPE Together

Think of publication scope as how far a publish travels and subscription scope as how far interest is advertised. Both must allow the path. Example: publisher on QM_PARIS publishes prod/finance/payment/posted; clustered administrative topic has PUBSCOPE(ALL); subscription on QM_LONDON with SUBSCOPE(ALL) and TOPICSTR prod/finance/payment/# should receive copies over cluster channels. If SUBSCOPE on London is QMGR, Paris may publish successfully while London never registered cluster interest—DISPLAY SUB on London shows QMGR scope. Fix architecture, not the publisher application.

shell
1
2
3
4
5
6
7
8
9
DEFINE TOPIC('PROD.FIN.CLUS') TOPSTR('prod/finance') TOPTYPE(CLUS) + CLUSTER('CORP') PUBSCOPE(ALL) SUBSCOPE(ALL) DEFINE SUB('FIN.ANALYTICS.LON') TOPICSTR('prod/finance/#') + DESTQL('FIN.ANALYTICS.Q') DESTQMGR('QM_LONDON') + DURSUB(YES) SUBSCOPE(ALL) DESTTYPE(UNMANAGED) DEFINE SUB('FIN.LOCAL.OPS') TOPICSTR('prod/finance/#') + DESTQL('FIN.LOCAL.Q') DESTQMGR('QM_LONDON') + DURSUB(YES) SUBSCOPE(QMGR) DESTTYPE(UNMANAGED) * ANALYTICS receives cluster publications; LOCAL.OPS only if published on QM_LONDON

ASPARENT and Administrative Topics

When many subscriptions share one domain, set SUBSCOPE on the CLUS administrative parent and use SUBSCOPE(ASPARENT) on DEFINE SUB for leaves—reduces inconsistent QMGR subs under a cluster-wide finance branch. Changing parent scope becomes a controlled change with impact analysis on all ASPARENT children. DISPLAY TOPIC and DISPLAY SUB should be reviewed together after ALTER.

Security and Compliance

SUBSCOPE(ALL) exports interest metadata to the cluster repository—competitors in multitenant labs aside, regulated shops ask whether subscription patterns reveal business activities (healthcare/claim/#). Data residency rules may forbid SUBSCOPE ALL on EU queue managers while US publishers remain QMGR-scoped. Document decisions in security architecture; technical MQ settings implement legal constraints.

Performance Impact of ALL

Each matching publication may traverse channels to every queue manager with ALL-scoped matching subscriptions. Wildcard prod/# at ALL on five members multiplies puts. Prefer narrow TOPICSTR, entity-level subscriptions, or stream partitioning for telemetry floods. Monitor cluster channel bytes and remote DEST CURDEPTH—not only publishing QM CPU.

Explainer: Newspaper Delivery Zones

SUBSCOPE QMGR is subscribing only to the neighborhood edition printed in your town. SUBSCOPE ALL is asking every printing plant nationwide to send copies when the story matches—even if you only read the London section. Publication scope is whether the story leaves the originating plant at all.

Troubleshooting Matrix

  1. Local pub OK, remote pub missing: DISPLAY SUB SUBSCOPE; expect ALL for remote.
  2. Remote pub OK, local missing: check publisher location and PUBSCOPE on topic.
  3. Nothing anywhere: TOPICSTR mismatch or missing subscription—not scope.
  4. Duplicate messages: overlapping subs at ALL on multiple QMs—consolidate subs.
  5. After cluster merge: re-DISPLAY SUB—stale repository may need refresh per IBM procedures.

ALTER SUBSCOPE in Production

ALTER SUB to change SUBSCOPE from QMGR to ALL mid-life may suddenly increase traffic—coordinate with network teams. Narrowing ALL to QMGR stops remote delivery but does not delete messages already queued. Change windows should include DISPLAY SUB and cluster repository verification on full and partial repos.

Explain Like I'm Five: Subscription Scopes

Scope is how far you raise your hand to say “I want those stories.” A small hand raise means only people in your room hear you. A big hand raise means every room in the building should send you a copy when the story matches.

Practice Exercises

Exercise 1

Design two subs on same DEST pattern—one QMGR one ALL—and predict Paris publish behavior.

Exercise 2

List three attributes to DISPLAY when remote fan-out fails.

Exercise 3

When is SUBSCOPE(QMGR) the correct security choice?

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. SUBSCOPE(QMGR) means:

  • Subscription interest local to this QM
  • All messages non-persistent
  • Channel type SDR
  • Topic tree disabled

2. Cross-QM pub/sub usually needs:

  • SUBSCOPE ALL and aligned PUBSCOPE on CLUS topic
  • Only DLQ defined
  • No listeners
  • XMITQ on subscription

3. SUBSCOPE and DURSUB are:

  • Independent dimensions
  • Same attribute
  • Always both NO
  • Only for aliases

4. Publisher on QM1, sub QM2, no messages—check first:

  • SUBSCOPE, PUBSCOPE, CLUS topic
  • Batch job CLASS
  • COBOL sequence area
  • JES2 nodes
Published
Read time17 min
AuthorMainframeMaster
Verified: IBM MQ 9.3 documentation