IBM MQ Architecture Overview

IBM MQ architecture is easier to learn if you picture a small network of post offices rather than a single database. Each post office is a queue manager. Mail slots inside the building are queues. Trucks between towns are channels. A doorbell on the loading dock that hears trucks arriving is the listener. Application programs are customers who drop off and pick up parcels—they never touch the trucks directly; the queue manager staff (MQ processes) handle routing, storage, and delivery. This page explains each building block, how messages flow from producer to consumer on one machine and across data centers, and which objects administrators define before applications can exchange data reliably.

The Queue Manager: Center of Everything

A queue manager (often shortened to QMgr) is a long-running process (or set of processes on z/OS) that owns all MQ resources on that host. When you install IBM MQ, you create at least one queue manager with crtmqm on distributed systems or the equivalent on z/OS. The queue manager has a unique name within your enterprise naming standards—for example QM.LONDON or PROD.PAYMENTS. Every MQOPEN, MQPUT, and MQGET is scoped to that name: clients call MQCONN with the queue manager name so MQ knows which repository of objects to use.

Inside the queue manager, IBM MQ keeps object definitions (queues, channels, listeners, authentication records) in a configuration repository backed by files on distributed platforms or VSAM and bootstrap data sets on z/OS. It also maintains logs for recovery: persistent messages survive restarts because the queue manager writes them to disk and journals changes. If the queue manager is not running, applications cannot connect—even if the machine is up. That is why operations teams monitor strmqm/endmqm and queue manager status as closely as database instance health.

Queues: Where Messages Wait

A queue is a named logical container for messages. Unlike a flat file, a queue is managed by the queue manager: messages have headers (format, length, persistence, message ID, correlation ID) and bodies (your business payload). Applications do not read bytes from a path like /var/mq/ORDERS; they request the next message from queue ORDERS.IN with MQGET.

Common queue types beginners meet include local queues, alias queues, remote queues, and model queues. A local queue (DEFINE QLOCAL) actually stores messages on this queue manager. An alias queue (QALIAS) provides another name for the same underlying queue—useful when renaming would break many programs. A remote queue (QREMOTE) does not store messages locally; it tells MQ "messages put here should ultimately arrive on queue PAY.REQ on queue manager QM.NYC," and MQ uses channels to route them. A model queue (QMODEL) is a template for creating dynamic queues when an application needs a temporary private inbox.

Transmission queues are a special local queue used internally: when MQ must ship messages to another queue manager, it places them on a transmission queue associated with a channel. You rarely MQGET from transmission queues in application code; they are plumbing for the channel layer.

Channels: Links Between Queue Managers

Channels are not queues. They are definitions and running instances of a protocol conversation between two queue managers (or between a client and a queue manager). A sender channel on QM.LONDON pairs with a receiver channel on QM.NYC with the same name (for example CHAN.LON.NYC). When messages target a remote queue, the channel agent (MCA) pulls from the transmission queue, frames messages, sends them over TCP/IP (or other supported transports), and the partner receiver channel puts them on the appropriate local queue.

Channel attributes matter for operations: CHLTYPE (SDR, RCVR, SVRCONN, etc.), CONNAME (host and port of the partner), TRPTYPE (TCP), SSL parameters, and heartbeat intervals for detecting network failure. Misconfigured CONNAME is one of the most common reasons messages sit on transmission queues with channel status RETRYING.

Listeners: The Network Door

Before a remote sender can connect, this queue manager must listen on a port. DEFINE LISTENER specifies the port (1414 is the traditional default), IP binding, and which transport to use. When you start the listener (START LISTENER), the queue manager accepts inbound connections and negotiates which channel definition applies. Think of the listener as the loading dock phone: channels are the trucks, but something must answer when the truck arrives.

Client applications using client channels connect through listeners on the queue manager they target. Server-connection (SVRCONN) channels authenticate and authorize those client attachments separately from queue-to-queue channels between data centers.

MQ Objects at a Glance

Core IBM MQ objects and roles
ObjectRole in architecture
Queue managerRuntime hub; repository of definitions; logging and recovery
Local queue (QLocal)Stores messages until an application MQGETs them
Remote queue (QRemote)Alias pointing to a queue on another queue manager
Transmission queueHolds messages staged for sending on a channel
ChannelMoves messages between queue managers (sender/receiver pair)
ListenerInbound network port for channel connections
Topic (pub/sub)Publish/subscribe routing; optional in many point-to-point designs

Channel Types You Will See

Common channel types
Channel typePurpose
Sender (SDR)Actively sends messages from this queue manager to a partner
Receiver (RCVR)Accepts inbound messages from a partner sender channel
Server-connection (SVRCONN)Allows client applications to attach to the queue manager
Client-connection (CLNTCONN)Template defining how clients reach a remote queue manager

Message Flow in Prose (Single Queue Manager)

Picture Application A on the same machine as queue manager QM1. Step one: A calls MQCONN to QM1 and receives a connection handle (Hconn). Step two: A calls MQOPEN on queue PAY.IN with options to put messages. Step three: A builds a message buffer describing an invoice and calls MQPUT; QM1 assigns a message identifier, optionally logs the message to disk if persistence is requested, and places the message on PAY.IN. Step four: Application B, which may be a batch job hours later, calls MQCONN, MQOPEN on PAY.IN with get options, and MQGET returns the invoice buffer. The queue decoupled A and B in time: A finished successfully even if B was down at put time.

Message Flow in Prose (Two Queue Managers)

Now Application A on QM.LONDON puts to a remote queue definition ORDERS.TO.NYC that resolves to queue ORDERS.IN on QM.NYC. QM.LONDON does not store the business message on ORDERS.TO.NYC; it resolves the route, places the message on the transmission queue for channel LON.TO.NYC, and starts (or uses) the sender channel. Packets cross the network to QM.NYC's listener. The receiver channel LON.TO.NYC accepts the flow and puts the message on local queue ORDERS.IN. Application B on QM.NYC MQGETs from ORDERS.IN exactly as if the message had been born locally. The only difference is latency and the operational need for channels to be RUNNING.

If the channel fails mid-flight, persistent messages remain recoverable from logs; the channel retries according to its configuration. That end-to-end story is the architectural promise of IBM MQ: once the put commit succeeds on the sending side under syncpoint rules you chose, the infrastructure—not the application—owns delivery across process and machine boundaries.

Publish/Subscribe (Optional Layer)

Many sites use only point-to-point queues. Pub/sub adds topics: publishers put to a topic string; the queue manager routes copies to every subscribed queue. Topics can reduce coupling when one event must fan out to many consumers, but the underlying queue manager, listeners, and channels still exist. Beginners should master local and remote queues before diving into topic trees and subscriptions.

Security and Authority Objects

Architecture is incomplete without who may connect. Channel authentication records (CHLAUTH), connection authentication, and queue manager authority records (SET AUTHREC) control which user IDs may attach, which queues they may put or get, and which channels may start. On z/OS, the queue manager integrates with RACF; on Linux, you might use LDAP or OS users depending on configuration. A listener open on 1414 without proper CHLAUTH is a security risk—architecture diagrams should include identity flow, not only message flow.

z/OS vs Distributed: Same Model

On IBM MQ for z/OS, the queue manager appears as a subsystem with address spaces (for example ASID for the queue manager task). Operators start and stop it with console commands; applications in CICS, IMS, or batch use the MQI with the same logical model. Channels can connect z/OS to Linux in hybrid clouds. The vocabulary differs slightly in installation manuals, but your mental diagram stays valid.

Tutorial: Define a Local Queue and Display It

The following MQSC example creates a local queue with a descriptive name and shows how to verify attributes. Replace QM1 with your queue manager name. MAXDEPTH controls how many messages may sit on the queue before puts are rejected; MSGDLVSQ influences whether priority ordering is used within the queue.

text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
runmqsc QM1 * Define a local queue for payment requests DEFINE QLOCAL(PAY.REQ) + DESCR('Payment requests from web channel') + MAXDEPTH(50000) + DEFPSIST(YES) * Confirm the definition DISPLAY QLOCAL(PAY.REQ) ALL * Optional: alter persistence default for new messages ALTER QLOCAL(PAY.REQ) DEFPSIST(YES) end

DEFPSIST(YES) means messages are persistent by default when applications do not override persistence— they survive queue manager restart. MAXDEPTH(50000) caps queue depth; if producers outpace consumers, MQ returns a reason code when the queue is full rather than consuming unbounded disk. DISPLAY QLOCAL shows CURDEPTH (current message count) and other live attributes once applications start putting messages.

Tutorial: Sketch a Channel Pair

Defining a channel requires agreeing on a shared channel name with the remote team and setting CONNAME to host(port). This snippet is illustrative; IP addresses and channel names must match your network design.

text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
* On QM.LONDON - sender channel toward QM.NYC DEFINE CHANNEL(LON.TO.NYC) CHLTYPE(SDR) + TRPTYPE(TCP) + CONNAME('192.0.2.10(1414)') + XMITQ('SYSTEM.TRANSMIT.LON.TO.NYC') DEFINE QLOCAL(SYSTEM.TRANSMIT.LON.TO.NYC) USAGE(XMITQ) * On QM.NYC - receiver channel with the SAME name DEFINE CHANNEL(LON.TO.NYC) CHLTYPE(RCVR) TRPTYPE(TCP) DEFINE LISTENER(TCP.LISTENER) TRPTYPE(TCP) PORT(1414) START LISTENER(TCP.LISTENER) * On QM.LONDON start the sender after receiver/listener ready START CHANNEL(LON.TO.NYC)

USAGE(XMITQ) marks the transmission queue. The sender channel's XMITQ attribute must match that queue name. CONNAME points to the partner's listener host and port. START CHANNEL moves the channel to RUNNING if networking and authorization succeed; DISPLAY CHSTATUS shows diagnostics beginners should learn early.

Explain Like I'm Five: MQ Architecture

There is a post office (queue manager) in your town. Inside are labeled mail slots (queues). You drop a letter in slot PAY.IN. Later, someone else picks it up from the same slot. If the letter must go to another city, workers put it on a truck (channel) that only drives when the road to the other post office is open (listener and channel running). The other post office puts the letter in its own slot so a local person can read it. You never drive the truck yourself—you just use the slot in your town, and MQ handles the rest.

Practice Exercises

Exercise 1: Draw the Flow

On paper, draw two queue managers, one local queue on each, one remote queue definition, one transmission queue, one sender/receiver channel pair, and two listeners. Label arrows for MQPUT, internal move to transmission queue, channel, and MQGET.

Exercise 2: Object Matching

Match each scenario to the object type: (a) store messages until batch runs, (b) accept client JVM connections, (c) point to a queue on another QMgr, (d) listen on port 1414.

Exercise 3: MQSC Lab

If you have a lab queue manager, run DISPLAY QMGR, DISPLAY QLOCAL(*), and DISPLAY CHSTATUS(*) after creating a test queue. Note which fields help you see backlog (CURDEPTH) and channel problems (STATUS, SUBSTATE).

Exercise 4: Failure Scenario

Write a short paragraph explaining what happens to a persistent message if the receiver queue manager is down when the sender MQPUTs to a remote queue, and what happens when it comes back up.

Test Your Knowledge

Test Your Knowledge

1. Which component do applications connect to first?

  • Channel
  • Listener
  • Queue manager
  • Transmission queue only

2. Messages travel between queue managers over:

  • Local queues only
  • Channels
  • Listeners only
  • Topic strings without a queue manager

3. A listener is responsible for:

  • Storing messages permanently
  • Accepting inbound network connections for channels
  • Replacing the need for queues
  • Compiling COBOL copybooks
Published
Read time10 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: IBM MQ 9.3 documentationSources: IBM MQ product documentation, IBM MQ concepts and overviewApplies to: IBM MQ 9.3 LTS, IBM MQ for z/OS