Every IBM MQ queue is more than a name—it is a bundle of attributes that tell the queue manager how the queue behaves. MAXDEPTH caps backlog; DEFPSIST chooses default durability; GET and PUT gate access; TRIGGER wires automatic processing. Mis-set attributes cause production mysteries: applications that worked yesterday fail with not authorized or queue full today after an ALTER. This tutorial walks through the attributes beginners touch most often, what each value does, how attributes interact, and MQSC patterns for safe change. Dedicated pages in this series go deeper on MAXDEPTH, TRIGGER, and CLUSTER; here you build the full attribute vocabulary.
DEFINE and ALTER QLOCAL change the repository definition. DISPLAY QLOCAL shows definition attributes; DISPLAY QSTATUS shows runtime depth and open handles. Some attributes exist only on the definition (DESCR, DEFPSIST); CURDEPTH is runtime. After ALTER, verify with DISPLAY and test MQOPEN from a representative application account—not only admin.
| Attribute | Effect |
|---|---|
| MAXDEPTH | Max message count on queue—queue full when reached |
| MAXMSGL | Max bytes per message—reject oversize puts |
| DEFPSIST | Default YES/NO persistence for puts |
| GET / PUT | Allow get, put, or both |
| SHARE | Whether multiple apps can share queue access |
| DEFSOPT | Default syncpoint option for gets |
| TRIGGER family | TRIGGER, TRIGTYPE, TRIGDPTH, PROCESS, INITQ |
| USAGE | Normal queue vs transmission (XMITQ) usage |
| CLUSTER | Publishes queue to named cluster |
GET(YES) allows MQGET; PUT(YES) allows MQPUT. Maintenance sometimes sets PUT(NO) to freeze inbound traffic while consumers drain backlog. GET(NO) creates a write-only queue—rare, used in special ingest patterns. These flags work with OAM: attribute YES plus no authority still fails. Teach developers that 2035 can be attribute or security.
DEFPSIST(YES) makes persistence the default—appropriate for financial and order data. DEFPSIST(NO) suits telemetry where loss on crash is acceptable. DEFSOPT controls default whether gets are under syncpoint (logical grouping with commit/rollback). YES encourages transactional gets coordinated with databases; NONE may improve throughput when idempotent processing allows it. Applications can override with MQGMO and MQPMO per call.
SHARE(YES) is standard for multiple consumers competing for work. SHARE(NO) forces exclusive open—useful when only one legacy program may touch the queue. DEFPRESP relates to default persistence response on put—advanced; beginners focus on DEFPSIST first. Platform-specific attributes (z/OS STGCLASS, QSGDISP) extend the table on mainframe queues.
TRIGGER(YES) enables the feature. TRIGTYPE(FIRST|EVERY|DEPTH) picks the event. TRIGDPTH applies to depth triggers. PROCESS names the process definition with APPLICID. INITQ names where trigger messages go. Missing any piece silences automation. See process definitions and trigger monitor tutorials for the full chain.
USAGE(NORMAL) is a standard application queue. USAGE(XMITQ) marks a transmission queue feeding sender channels—do not point applications at XMITQ for business logic. DEFBIND controls how puts to QREMOTE resolve queue manager binding (OPEN, NOTFIXED, GROUP). DISTL enables distribution lists on supported platforms. Wrong USAGE on a queue used for apps breaks routing or channel startup.
BOQNAME names a backout queue where messages land after repeated rollback failures (backout count). BOTHRESH sets the backout threshold. Pair with poison message handling and dead-letter queues for operations runbooks. Without BOQNAME, poison messages may loop forever on the main queue, inflating CURDEPTH.
Change one attribute at a time in production when possible. Document before/after DISPLAY output. For MAXDEPTH reductions, ensure CURDEPTH is below the new cap first. For GET/PUT changes, coordinate application restarts. Cluster attributes may require REFRESH CLUSTER after ALTER on cluster queues.
123456789101112* High-reliability work queue DEFINE QLOCAL('ORDERS.IN') REPLACE + MAXDEPTH(500000) MAXMSGL(4194304) + DEFPSIST(YES) GET(YES) PUT(YES) SHARE(YES) + DEFSOPT(YES) DESCR('Persistent orders') * Low-value telemetry DEFINE QLOCAL('METRICS.IN') REPLACE + MAXDEPTH(10000) MAXMSGL(65536) + DEFPSIST(NO) GET(YES) PUT(YES) SHARE(YES) + DESCR('Non-persistent metrics') DISPLAY QLOCAL('ORDERS.IN') MAXDEPTH DEFPSIST DEFSOPT DISPLAY QLOCAL('METRICS.IN') MAXDEPTH DEFPSIST
The mailbox has rules on a sign: how many letters fit (MAXDEPTH), whether letters must be copied into a safe vault (DEFPSIST), whether you may drop letters in (PUT) or take them out (GET), and whether a robot should run when letters arrive (TRIGGER). Attributes are the sign; the queue is the box.
Design attribute sets for payment queue vs metrics queue. List at least six attributes each.
After ALTER QLOCAL DEFPSIST(NO), old messages still persistent. Why?
PUT(NO) but depth still rises. Name two non-application causes to check.
1. DEFPSIST(YES) means new messages default to:
2. PUT(NO) on a queue prevents:
3. TRIGGER(YES) with PROCESS and INITQ enables:
4. MAXMSGL controls: