Repository Manager Internals

Every DEFINE QLOCAL, ALTER CHANNEL, and DELETE TOPIC changes more than what DISPLAY shows in memory—it updates the queue manager object catalog on disk and records the change in the log so a future restart knows the object exists with those attributes. The repository manager is the subsystem that owns that catalog: allocating internal tables, serializing definitions to repository files, coordinating with logging for durability, and serving lookups when applications MQOPEN by name. When administrators say the repository is corrupt, they mean this catalog no longer matches what the log expects or files are damaged—symptoms include failure to start, missing objects that were defined yesterday, or DEFINE failing with media or repository return codes. This tutorial separates local repository internals from cluster repository replication, walks through startup load, explains relationship to dmpmqcfg output, covers inconsistency symptoms, and gives safe operational habits for beginners who already know runmqsc but not what happens underneath.

Local Catalog Versus Cluster Publication

All queue managers maintain a local repository. Cluster members additionally publish cluster object subsets to partners via the cluster repository manager described in the operational repository manager page. Internally both rely on the same catalog technology at the base layer—cluster adds replication messages and full versus partial repository roles. A non-cluster queue manager still runs repository manager logic for every object; it simply skips cluster publication traffic.

Repository layers
LayerScopeSurvives restart
In-memory catalogSingle running QMUntil shutdown if not logged
Repository files on diskSingle QM directoryYes, with log replay
Cluster repository cacheCluster membersRebuilt from full repos and channels

On-Disk Layout (Distributed)

Under the queue manager path you find directories such as qmgr, log, and queue data folders. Repository data lives in managed files—not meant for hand editing. The exact file names and split vary by version; IBM documents the layout in platform guides. Administrators should monitor disk on the qmgr volume: a full disk blocks both log extension and repository updates, producing cascading failures that look like mysterious MQRC errors. Permissions must allow only the mqm group (or equivalent) to write—host compromise of that directory is full control of definitions.

text
1
2
3
4
5
6
# Illustrative layout — paths vary by install /var/mqm/qmgrs/QM1/ qmgr/ # repository and control files log/ # write-ahead log queues/ # message data (see persistence tutorial) dspmq -m QM1 # confirms path and status

How DEFINE Flows Through the Repository Manager

  1. runmqsc or PCF sends DEFINE QLOCAL to the command server.
  2. Command validation checks syntax, authority, and naming rules.
  3. Repository manager allocates catalog entry and persists change.
  4. Log records describe the commit point for recovery.
  5. DISPLAY QLOCAL reflects new object; applications can MQOPEN after authorization passes.

ALTER changes attributes—MAXDEPTH, DEFPSIST, TRIGGER—by updating the same catalog entry. DELETE marks removal; applications with open handles may retain access until MQCLOSE. Rapid scripted changes during incidents still hit the same path; flooding DEFINE can contend on internal locks discussed in the locking internals tutorial.

Startup: Loading the Catalog

During strmqm, after log replay establishes a consistent recovery point, the queue manager loads repository files into memory structures. Channels and listeners defined in the catalog become eligible to start per configuration. A damaged repository before log replay completes may abort startup with AMQ errors referencing repository or media recovery. Operators capture the error, verify disk health, and consult IBM documentation for supported recovery—options may include restoring qmgr from backup taken while queue manager was cleanly ended.

Relationship to dmpmqcfg and Promotion

dmpmqcfg exports catalog definitions as a script of MQSC or JSON—not a raw binary copy of repository files. Promotion pipelines replay those scripts on target queue managers, which re-enters the repository manager path on each DEFINE. This is safer than copying binaries because names, paths, and platform differences are visible in diff review. Object promotion tutorials complement this page for DevOps workflows.

Corruption and Inconsistency Symptoms

  • Queue manager fails early in startup with repository or media recovery messages.
  • Objects exist in DISPLAY on one node after restore but messages reference missing queues on another.
  • DEFINE fails consistently for any new object while disk shows free space—possible internal structure damage.
  • Cluster routes behave as if definitions vanished while local DISPLAY still shows them—may be cluster repo not local.

Distinguish local corruption from cluster inconsistency: REFRESH CLUSTER addresses cluster sync, not substitute for fixing a broken local qmgr directory. Never delete files in qmgr folder to fix symptoms without IBM support case guidance.

Logging and the Repository

Repository changes are logged like other persistent metadata. Unclean shutdown relies on log replay to redo incomplete catalog transactions. If log and repository disagree after storage failure, supported recovery tools reconcile—manual hex editing is not supported. Pair this topic with logging internals and recovery processing for end-to-end restart understanding.

Explainer: Building Directory in a Filing Cabinet

The repository manager is the clerk who maintains the card catalog for a library—every new shelf label (queue) or rule (channel) gets a card in the cabinet and a note in the daily journal (log) so if the office floods, you can rebuild the catalog from the journal.

Operational Best Practices

Take configuration exports after significant changes. End queue managers cleanly before VM snapshots when possible. Monitor qmgr filesystem separately from message data disks. Restrict who can run DELETE QMGR on shared admin hosts. Version-control dmpmqcfg output in Git with peer review like application code.

Explain Like I'm Five: Repository Manager Internals

The repository manager is the list of all the boxes and tubes in the mail room, written in a book that does not get erased when the lights go out—because we also copy every change into a diary so we can fix the book after a mess.

Practice Exercises

Exercise 1

Run dmpmqcfg on lab QM and identify three object types stored in repository.

Exercise 2

After clean endmqm and strmqm, verify DEFINE QLOCAL(TEST.REPO) survives restart.

Exercise 3

Map disk mounts for log, qmgr, and queues paths on your platform.

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. Local repository holds:

  • Object definitions
  • Only message bodies
  • Browser cache
  • JCL libraries

2. DEFINE QLOCAL updates:

  • Repository and log
  • Only client RAM
  • DNS
  • FTP

3. Cluster repository is extra when:

  • QM is in a cluster
  • No channels exist
  • All msgs non-persistent
  • Using only clients

4. Manual delete of repo files:

  • Dangerous—avoid without IBM guidance
  • Daily housekeeping
  • Replaces backup
  • Speeds PUT
Published
Read time22 min
AuthorMainframeMaster
Verified: IBM MQ 9.4 documentation