Topic clustering best practices distill what operations teams learn after the first cluster-wide pub/sub outage: one CLUS object per business domain, scope attributes chosen on purpose, ACLs identical on every member, subscriptions consolidated instead of sprouted, and monitoring that treats cluster channel bytes as part of event throughput. IBM MQ does not forgive accidental prod/# SUBSCOPE(ALL) on twelve queue managers—routing tables grow, security exposure widens, and the first Black Friday publish saturates CLUSSDR links. This tutorial is a design guide for beginners and architects: repository hygiene, hierarchy alignment, security matrix, capacity formulas, testing checklist, upgrade and migration notes, anti-patterns from real incidents, and handoff documents for development teams publishing into a cluster.
Standard pattern: CLUS administrative parent at prod/domain/entity with TOPSTR matching three segments; LOCAL children for each event leaf; ALIAS topics only for migration. Example: PROD.RETAIL.CLUS → prod/retail (CLUS, CLUSTER CORP, PUBSCOPE ALL, SUBSCOPE ALL); PROD.RETAIL.ORDER.CREATED → prod/retail/order/created (LOCAL, ADMINTOPIC parent). Publishers use leaf strings; repository carries one cluster definition per branch.
1234567DEFINE TOPIC('PROD.RETAIL.CLUS') TOPSTR('prod/retail') TOPTYPE(CLUS) + CLUSTER('CORP') PUBSCOPE(ALL) SUBSCOPE(ALL) DESCR('Retail cluster root') DEFINE TOPIC('PROD.RETAIL.ORDER.CREATED') + TOPSTR('prod/retail/order/created') TOPTYPE(LOCAL) + ADMINTOPIC('PROD.RETAIL.CLUS') DEFINE SUB('RETAIL.ANALYTICS') TOPICSTR('prod/retail/#') + DESTQL('RETAIL.ANALYTICS.Q') SUBSCOPE(ALL) DURSUB(YES) DESTTYPE(UNMANAGED)
| Practice | Benefit | Anti-pattern |
|---|---|---|
| CLUS at domain root only | Clean repository | CLUS on every leaf |
| Document PUBSCOPE/SUBSCOPE | Predictable fan-out | Default ASPARENT without review |
| Replicate topic ACLs | Symmetric security | ACL only on primary QM |
| Consolidate ALL subs | Lower routing load | Per-app ALL on prod/# |
| Monitor CLUS channels | Early overload detect | Only monitor local CPU |
| Lab three-QM test | Prove routing pre-prod | First test in production |
Publishing-only site: PUB granted, SUB denied on sensitive branches, SUBSCOPE QMGR on any required local monitoring subs. Central analytics hub: SUBSCOPE ALL on narrow patterns, no PUB on production event branches. DR site: replicate CLUS definitions and ACLs before failover drill; verify subscriptions reload on cold start. ASPARENT only when parent SUBSCOPE and PUBSCOPE are explicitly approved in architecture board minutes—not because it is the default in samples.
Estimate: publish rate × matching subscription count × average message size × remote factor = cluster channel load. Wildcard subs on prod/retail/# multiply matches. Add 30 percent headroom for retain and DLQ copies. Size DEST MAXDEPTH on each subscriber QM for offline duration. Full repository queue managers need CPU for repository updates—do not starve REPOS role systems.
Introduce CLUS parent at existing domain prefix without changing publish strings. Add SUBSCOPE ALL only where cross-QM delivery required. Roll ACL scripts to new members before switching publishers. Run parallel consume from old local subs and new cluster subs during cutover window; compare message counts. Remove QMGR-scoped subs after validation.
Cluster topic design is planning highways between cities (queue managers): few main interchanges (CLUS parents), local roads for neighborhoods (LOCAL leaves), toll rules (ACLs) identical at every city gate, and traffic counters on interstates (channel monitoring)—not paving a separate highway for every house.
When many schools share announcements, you use one main rule book, the same safety rules at every school, and only send copies to schools that signed up—not shout every story to every school in the world.
Design CLUS parent plus two LOCAL leaves for logistics domain.
Write pre-go-live test checklist with five steps.
Calculate channel load: 500 msg/s × 8 subs × 4 KB.
1. CLUS topic should usually be at:
2. Leaf events typically use:
3. ACLs on cluster need:
4. SUBSCOPE ALL on prod/# for many apps: