MQ Naming Standards

IBM MQ does not care whether your queue is called Q1 or ORDERS.PAYMENTS.ACME.PROD.IN—until three teams use Q1 and incidents take hours. Naming standards turn object names into a readable catalog: environment, application, direction, and version visible before DISPLAY completes. Bad names cause MQRC 2085, wrong cluster routes, and CCDT files that point to last year's DR queue manager. Good names make grep, monitoring, and access reviews straightforward. This tutorial defines practical enterprise conventions for queue managers, queues, channels, topics, clusters, and related objects, explains IBM length limits, compares pattern choices, and shows how to enforce standards in MQSC pipelines without blocking delivery velocity.

Principles of Good MQ Names

Names should be unique within the scope where they are resolved—on one queue manager for QLOCAL, across a cluster for cluster queues, globally for channel pairs agreed between partners. Avoid ambiguous abbreviations that differ only by one character. Encode environment (DEV, TST, UAT, PRD) explicitly; never rely on separate queue managers alone because CCDT mistakes cross environments. Use dot or underscore separators consistently; dots match DNS and topic hierarchy habits. Document the dictionary of segment meanings so ORDERS.PAYMENTS.IN is unambiguous versus ORDERS.PAYMENTS.OUT.

Naming principle checklist
PrincipleBenefitAnti-pattern
Predictable segmentsFaster DISPLAY and alertsTEAM1Q, TEAM2Q
Environment in name or QM namePrevents prod code in testSame ORDERS.IN on DEV and PRD QM
Direction suffix .IN .OUT .REQ .RPLClear flowORDERS only
Owner or app code segmentAccess reviewsMISC queue

Queue Manager Names

Queue manager names appear in CONNAME paths, cluster repositories, and certificates. Keep them short on z/OS where tradition used four characters; distributed allows longer names but prefer concise stable identifiers. Include site or role when multiple hubs exist: QM_NYC_HUB, QM_LON_DR. Avoid renaming queue managers in production—certificates, channels, and partner configs embed the name. Document primary and DR queue manager pairs in the connection handbook.

Queue Naming (QLOCAL, QALIAS, QREMOTE)

Application queues use APP.DOMAIN.PURPOSE.DIRECTION—for example PAYMENTS.ACH.SETTLEMENT.IN. Alias queues add a stable indirection layer: ALIAS.PAYMENTS.IN → QLOCAL physical name. Remote queue names can mirror the partner local name or use local convention plus RQMNAME attribute clarity. Dead-letter and backout queues use explicit DLQ and BOQ segments so operators never point triggers at business queues by mistake. Model queues for dynamic reply use a clear MODEL suffix.

shell
1
2
3
4
5
DEFINE QLOCAL('PAYMENTS.ACH.SETTLEMENT.IN') + DESCR('Inbound ACH settlement from gateway') + MAXDEPTH(500000) DEFPSIST(YES) DEFINE QALIAS('ALIAS.PAYMENTS.IN') TARGQ('PAYMENTS.ACH.SETTLEMENT.IN') DEFINE QLOCAL('PAYMENTS.ACH.SETTLEMENT.DLQ') DEFPSIST(YES)

Channel Naming

Point-to-point channels traditionally encode source and target queue managers: QMNY.QMLON or APP.HUB.PRD. The same string exists on both sides with CHLTYPE SDR on source and RCVR on target. Cluster channels use CLUSRCVR and CLUSSDR patterns defined by cluster conventions—often QMNAME.CLUSTERNAME or auto-defined names you should not fight without reason. SVRCONN names often include application and environment: APP.CLIENT.PRD for client connections and CHLAUTH rules.

Topic and Subscription Naming

Topic strings are hierarchical: /acme/payments/ach/status. Align with enterprise event taxonomy; avoid deep trees that exceed admin clarity. Durable subscriptions benefit from SUB.APP.ENV naming on SUB objects while TOPICSTR carries the tree. Pub/sub security maps to topic patterns—predictable trees simplify AUTHREC and topic authority.

Cluster and Repository Conventions

Cluster names should be few and well known—CLUSTERA_PROD not CLUSTER_NEW_FINAL2. ClusQmgr names in repositories follow queue manager names. Uniform naming lets REFRESH CLUSTER and DISPLAY CLUSQMGR output scan quickly during incidents.

Length Limits and Special Characters

Most MQ object names allow up to 48 characters. Avoid quotes inside names; use MQSC quoted strings. Some characters are restricted on certain platforms—stick to A-Z, 0-9, dot, underscore, and dollar if site allows. Lowercase works but mixed case causes 2085 when scripts assume uppercase. Validate length in CI before runmqsc deploy.

Governance and Automation

  1. Publish naming standard PDF or internal wiki with examples.
  2. Add regex validation in MQSC Git pipelines.
  3. Require architecture review for new object prefixes.
  4. Export dmpmqcfg monthly; report names violating standard.
  5. Block DEFINE in production without ticket reference in DESCR.

Comparing Pattern Styles

Dot-separated hierarchies (APP.DOMAIN.PURPOSE.DIR) excel for sorting and wildcards in monitors. Underscore-separated (APP_DOMAIN_IN) excel for legacy mainframe screens with limited punctuation. Hungarian-style prefixes (QL_PAYMENTS_IN) make object type obvious in flat lists but add length. Pick one style per data center; hybrid estates confuse offshore support. DESCR attribute should repeat human meaning when names must stay short for 48-character limits.

Explainer: Names as Street Addresses

A standard address has country, city, street, and number. Everyone finds the building. If addresses are random nicknames, couriers call every incident a new mystery—same as MQ with ORDERS versus ORDERS1 versus ORDERS_PROD_FINAL.

Explain Like I'm Five: Naming Standards

Every toy box gets a label that says whose toys, which room, and whether stuff goes in or out. Then nobody puts Lego in the doll box by accident.

Practice Exercises

Exercise 1

Propose names for one request-reply pair and one hub channel with environment prefix.

Exercise 2

Audit ten production queues; flag names that violate your new standard.

Exercise 3

Write a regex that accepts APP.DOMAIN.PURPOSE.IN pattern for CI.

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. SDR and RCVR pair channel names must:

  • Match on both queue managers
  • Always differ
  • Be 3 chars only
  • Include DLQ

2. Inconsistent naming often causes:

  • 2085 unknown object
  • TLS success only
  • Higher MAXDEPTH
  • Automatic cluster admin

3. A good naming standard includes:

  • Environment prefix and owner
  • Random UUID only
  • No documentation
  • All lowercase mandatory

4. Object name length limit is typically:

  • 48 characters
  • 8 characters always
  • 256 for all types
  • Unlimited
Published
Read time24 min
AuthorMainframeMaster
Verified: IBM MQ 9.4 object definition limits