Queues are the mailboxes of IBM MQ—where messages live until someone collects them or a channel forwards them. Every beginner story starts with MQPUT and MQGET on a queue name; understanding queue types and attributes separates lab success from production reliability. This overview covers local, remote, alias, and model queues, special-purpose queues such as transmission and dead-letter queues, essential attributes like MAXDEPTH and DEFPSIST, GET and PUT authority, and how queues fit into clusters. Deeper tutorials in this series drill into each property; here you build the mental model.
A local queue stores messages on the queue manager where it is defined. CURDEPTH increases on put and decreases on get. Applications and channels both use local queues—business work queues, transmission queues, initiation queues, and the dead-letter queue are all QLOCAL underneath. Capacity, persistence, triggering, and sharing options apply here.
A remote queue is a definition, not a separate mailbox on disk. It names RNAME (remote queue name), RQMNAME (remote queue manager), and XMITQ (transmission queue on this manager). When an app puts to the remote queue name, the queue manager stores the message on the XMITQ and a sender channel delivers it. Operators change routing by ALTER QREMOTE without touching application code if names stay stable.
Alias queues point to another queue name—local, remote, or another alias. Use them for environment-specific indirection (PAYMENTS.IN alias to PAYMENTS.IN.PROD) or to switch destinations during migration. DISPLAY QALIAS shows TARGQ and TARGQMGR. Misconfigured targets cause puts to wrong queues silently if authority allows.
Model queues define defaults for temporary dynamic queues created when an application requests a dynamic queue name in MQOPEN. Request/reply patterns use model queues so each request gets a private reply queue that expires when closed. Permanent dynamic queues are a related advanced topic.
| Type | Stores messages? | Typical use |
|---|---|---|
| QLOCAL | Yes | |
| QREMOTE | No (routes) | |
| QALIAS | No (indirection) | |
| QMODEL | Template only | |
| XMITQ (QLOCAL) | Yes, pending forward |
MAXDEPTH caps message count—when full, producers block or fail. MAXMSGL caps bytes per message. DEFPSIST sets default persistence. GET and PUT control whether consumers and producers may access the queue. SHARE allows multiple applications to get concurrently with appropriate options. TRIGGER and related attributes enable the trigger monitor. BOQNAME and BOTHRESH route poison messages to backout queues. Compare attribute combinations: a high-throughput telemetry queue might use DEFPSIST(NO) and large MAXDEPTH; a payment queue uses DEFPSIST(YES) and moderate depth with alerting.
1234567DEFINE QLOCAL('ORDERS.IN') REPLACE + MAXDEPTH(100000) MAXMSGL(1048576) DEFPSIST(YES) + DESCR('Inbound orders') GET(ENABLED) PUT(ENABLED) DEFINE QALIAS('ORDERS') TARGET('ORDERS.IN') REPLACE DEFINE QREMOTE('ORDERS.TO.HUB') REPLACE + RNAME('ORDERS.IN') RQMNAME('QM_HUB') XMITQ('QM_HUB.XMIT') DISPLAY QLOCAL('ORDERS.IN') CURDEPTH MAXDEPTH DEFPSIST
A queue is a mailbox with a name. You drop letters in (put) and someone takes them out (get). A remote queue is a sign that says “this mail goes to another city’s post office.” An alias is a second label on the same mailbox.
App puts to QREMOTE ORDERS.TO.HUB. Name objects touched on local QM before channel sends.
MAXDEPTH 1000, CURDEPTH 1000. What happens on next MQPUT?
When use QALIAS instead of renaming QLOCAL?
1. Messages are physically stored on:
2. QALIAS is used to:
3. CURDEPTH is:
4. QMODEL supports: