MQ Client Architecture

IBM MQ client architecture is the blueprint for how application programs on laptops, Kubernetes pods, or distributed servers talk to a central queue manager that actually owns the queues. The word client confuses newcomers who expect a user interface—it means the MQ client library linked into your process, not a desktop app. Your Java or COBOL program calls MQCONN and MQPUT; the library opens TCP to a listener; the remote queue manager receives the MQI request on an SVRCONN channel instance and performs the put on QLOCAL PAY.IN. No message channel or transmission queue is involved for that path unless you also run SDR to another site. This tutorial maps components—application, client library, network, listener, SVRCONN, queue manager, queues—and contrasts client connectivity with message channels so architecture reviews and incident calls use the same vocabulary.

Logical Layers

At the top, business applications implement workflows: order capture, payment handoff, audit logging. They use language bindings that wrap the MQI. The client runtime serializes MQI into the wire protocol IBM documents for client connections. TCP carries bytes to the server host. The listener accepts the socket and hands it to the queue manager, which associates the session with SVRCONN and an MCAUSER. The command server and agents execute OPEN PUT GET against objects in the repository. Messages persist according to DEFPSIST on queues. Replies may use temporary dynamic queues or named reply queues. Understanding this stack helps you know whether to call network, MQ channel, CHLAUTH, or OAM teams when something breaks.

Client path versus message channel path
AspectMQ clientMessage channel SDR/RCVR
Who initiatesApplication MQCONNQueue manager channel initiator
Channel typeSVRCONN / CLNTCONNSDR / RCVR
MovesMQI requestsMessages on XMITQ
Typical userDevelopersMiddleware ops

Components on the Application Host

  • Application process—your code and business rules.
  • MQ client library—mqic.dll, libmqm.so, or language-specific jar with native code.
  • Connection metadata—CCDT, MQSERVER, JSON config, or MQCONNX parameters.
  • Optional TLS keystores on client for mutual TLS.
  • Environment variables—MQCHLLIB, MQCHLTAB, MQSERVER for location of definitions.

The client library does not require a full queue manager install on the laptop—client-only installs are smaller. Bindings mode is different: the application runs on the same machine as the queue manager and links directly—covered in the client versus bindings tutorial.

Components on the Server Host

Full queue manager install: repository of queues and channels, listener, command server, logging, optional TLS key repository SSLKEYR. SVRCONN defines how clients attach—MAXMSGL, MCAUSER, SSLCIPH, SHARECNV for conversation sharing. CHLAUTH and CONNAUTH gate who may connect. OAM or z/OS profiles gate which queues MCAUSER may use—2035 when grants are missing. Multi-instance and Kubernetes operators still present a listener service fronting the queue manager pods.

Connection Establishment Flow

shell
1
2
3
4
5
6
* Server preparation (operations) DEFINE LISTENER('TCP.LISTENER') TRPTYPE(TCP) PORT(1414) CONTROL(QMGR) START LISTENER('TCP.LISTENER') DEFINE CHANNEL('APP.SVRCONN') CHLTYPE(SVRCONN) TRPTYPE(TCP) MCAUSER('appuser') * Application (conceptual): MQCONNX to QM1 channel APP.SVRCONN host port 1414 DISPLAY CHSTATUS('APP.SVRCONN')

MQCONNX supplies queue manager name, connection name, and channel name—or reads them from CCDT. TCP three-way handshake completes. TLS may run if configured on both sides. CHLAUTH evaluates. Channel instance reaches RUNNING. MQCONN returns a connection handle to the application. Subsequent MQOPEN targets queue names on that queue manager. Disconnect uses MQDISC. Channel instance may remain for SHARECNV conversations or end per policy.

Scaling and Deployment Patterns

Many microservice replicas each run an MQ client to one hub queue manager—watch SVRCONN and listener capacity and MCAUSER pool design. Connection storms during deploys can exhaust MAXINST on channel definitions—tune and use SHARECNV where appropriate. Hub-and-spoke messaging between data centers still uses message channels between queue managers; clients at the edge talk only to their regional hub. Document which flows are client-only versus which also need SDR/RCVR pairs.

Observability

  • Client logs—application and MQ client trace when enabled.
  • Server CHSTATUS—active SVRCONN instances and MCAUSER.
  • Queue depth—CURDEPTH on application queues.
  • Network—latency and firewall between client subnet and listener.

Explainer: Bank Branch Versus HQ Vault

The application is a bank branch clerk. The client library is the secure phone line to headquarters. The queue manager is the vault where deposits actually sit. Message channels are armored trucks between vaults in different cities—different job than the phone line.

Explain Like I'm Five: MQ Client Architecture

Your game on your tablet sends moves over the internet to the main computer that keeps the real scoreboard—your tablet is the client and the big computer is the queue manager.

Practice Exercises

Exercise 1

Draw a diagram with five boxes: app, client lib, network, listener, queue—and label the MQI call at each step.

Exercise 2

Explain why a failing SDR does not stop a working SVRCONN client on the same queue manager.

Exercise 3

List server objects required before first successful MQCONNX from a new microservice.

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. MQ client connects to:

  • Remote queue manager
  • Only local files
  • JES only
  • CICS only

2. Server listens on:

  • LISTENER port
  • XMITQ
  • DLQ only
  • INITQ

3. Applications use:

  • MQI calls
  • FTP only
  • JCL only
  • SQL only

4. SDR/RCVR move messages:

  • Between queue managers
  • Only inside one app
  • Without TCP
  • Only on laptop
Published
Read time20 min
AuthorMainframeMaster
Verified: IBM MQ 9.3 documentation