Queue managers, queues and channels
Everything in MQ belongs to a queue manager. Queues hold messages; channels move them between queue managers. Knowing the handful of object types lets you read any MQ configuration.
The queue manager
A queue manager owns queues and other objects and provides the MQI that applications call. On z/OS it runs as two address spaces: the master (xxxxMSTR), which manages queues, logging and recovery, and the channel initiator (xxxxCHIN), which runs the channels that talk to other queue managers. Queue manager names on z/OS are up to four characters, for example MQP1.
Queue types
| Object | What it is | Example use |
|---|---|---|
| Local queue | A real queue that holds messages on this queue manager | PAYMENTS.IN read by a CICS program |
| Remote queue definition | A local name that points at a queue on another queue manager | Put to PARTNER.ORDERS and MQ routes it away |
| Transmission queue | A special local queue holding messages waiting to go down a channel | MQP2.XMITQ |
| Alias queue | Another name for a queue or topic | Lets you repoint applications without changing code |
| Model queue | A template from which dynamic queues are created | Temporary reply queues |
| Dead-letter queue | Where MQ puts messages it cannot deliver | SYSTEM.DEAD.LETTER.QUEUE or a site-named DLQ |
How a message reaches another system
Channels are one-way and come in matching pairs. A sender channel on one side talks to a receiver channel of the same name on the other. Client applications on servers connect through a server-connection (SVRCONN) channel instead of having their own queue manager.
Triggering
A program does not have to poll a queue all day. With triggering, MQ writes a trigger message to an initiation queue when work arrives, and a trigger monitor starts the right program. In CICS the supplied trigger monitor is the CKTI transaction, which starts the CICS transaction named in the process definition.
DEFINE QLOCAL('PAYMENTS.IN') +
DESCR('Payments from mobile channel') +
DEFPSIST(YES) MAXDEPTH(100000) +
BOTHRESH(3) BOQNAME('PAYMENTS.BACKOUT') +
TRIGGER TRIGTYPE(FIRST) +
INITQ('CICS01.INITQ') PROCESS('PAYMENTS.PROC')DEFPSIST(YES)MAXDEPTH(100000)BOTHRESH(3) BOQNAME(...)TRIGGER TRIGTYPE(FIRST)Common mistakes
It is only a pointer. Messages for it wait on the transmission queue until the channel sends them.
Channels are pairs. The sender side usually initiates; if the receiver side or network is unavailable the sender goes into RETRYING.
Triggering needs the queue's TRIGGER settings, an initiation queue, a process definition and a running trigger monitor. Miss one and messages just sit there.
What you will see at work
- MQ administrators own object definitions; developers request queues and agree names, persistence and depth.
- When a partner says 'we sent it', the transmission queue and channel status tell you whether it actually left.
- Dead-letter queue checks are part of many daily health checklists.
Key terms
Check your understanding.
Take this lesson's quiz and save your progress. Free.