STOP (MQSC)

STOP is the controlled way to end running IBM MQ infrastructure without deleting definitions. Maintenance on certificates, firewall rules, or CONNAME often begins with STOP CHANNEL and STOP LISTENER, then DISPLAY to confirm INACTIVE or STOPPED states, then ALTER, then START to verify RUNNING. Emergency stops during incidents pause message flow so backlog grows on transmission queues—communicate business impact when payment channels stop. STOP is not endmqm: the queue manager keeps serving local queues and other channels. This tutorial covers STOP CHANNEL and LISTENER syntax, graceful behavior, impact on XMITQ and partners, coordination with RESET when sessions are stuck, production change windows, and differences between stopping components versus shutting down the entire queue manager.

STOP CHANNEL

STOP CHANNEL('PARTNER.SDR') requests the channel instance to end. The channel may pass through STOPPING before INACTIVE or STOPPED. Partner receiver channels see disconnect and may return to INACTIVE. Uncommitted in-flight batches follow channel protocol rules—persistent messages remain on XMITQ on the sender. For planned maintenance, stop producers first if possible, allow XMITQ to drain, then STOP CHANNEL to avoid large backlogs. Abrupt stops during high load leave depth that must drain after START.

shell
1
2
3
4
5
6
DISPLAY CHSTATUS('PARTNER.SDR') CHSTATUS DISPLAY QSTATUS('SYSTEM.DEAD.LETTER.QUEUE') CURDEPTH * Note XMITQ name from channel definition — often custom XMITQ STOP CHANNEL('PARTNER.SDR') DISPLAY CHSTATUS('PARTNER.SDR') CHSTATUS * Confirm STOPPED or INACTIVE before ALTER or certificate change

STOP LISTENER

STOP LISTENER('TCP.LISTENER') closes the TCP listen socket. New inbound connections fail; existing channel sessions may continue until they disconnect. Apply listener STOP before changing PORT or TLS certificates on the inbound edge. Remember to START LISTENER after maintenance and ask partners to retry or START their senders.

STOP impact
STOP targetMessage flowDefinition
Sender channelXMITQ accumulatesRetained
Receiver channelInbound stopsRetained
ListenerNo new inboundRetained
ServiceProcess endsRetained
Local queueN/A — use PUT disabledALTER not STOP

STOP Versus endmqm

endmqm stops the entire queue manager process—all channels, listeners, and application connections drop. STOP CHANNEL targets one path. Production incidents sometimes confuse them: stopping one bad channel is surgical; endmqm is nuclear for application availability. Queue manager shutdown tutorials cover quiesce and graceful endmqm flags.

Partner Coordination

When you STOP a receiver listener, partner senders show RETRYING and XMITQ depth rises on their side. Notify partner operations with time window and expected retry behavior. Sequence number mismatches after unclean stops may need RESET CHANNEL per IBM procedures—do not RESET casually in interview answers or production without runbook.

Maintenance Runbook Pattern

  1. Announce window; monitor critical queues.
  2. STOP application traffic or disable PUT if needed.
  3. STOP CHANNEL(s); STOP LISTENER if inbound.
  4. DISPLAY until stopped; apply ALTER or OS changes.
  5. START LISTENER; START CHANNEL; verify RUNNING.
  6. Confirm depth draining; notify stakeholders all clear.

Explainer: Parking the Truck

STOP parks the mail truck. Letters already loaded (XMITQ) stay in the truck; new letters pile up at the loading dock until the truck runs again (START).

Explain Like I'm Five: STOP

STOP tells the mail truck to park. The mailbox names still exist, but mail cannot drive on that road until someone says go again.

Practice Exercises

Exercise 1

Measure XMITQ depth before STOP, during STOP, after START on lab pair.

Exercise 2

STOP LISTENER; attempt partner connect; document error on partner CHSTATUS.

Exercise 3

Write maintenance ticket template including STOP/START order.

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. STOP CHANNEL leaves:

  • Definition; stops session
  • No definition
  • All messages deleted
  • QM deleted

2. Messages on XMITQ after STOP:

  • Remain until channel runs
  • Vanish
  • Auto-forward
  • Go to DLQ always

3. STOP LISTENER blocks:

  • New inbound TCP connections
  • All MQPUT globally
  • Db2
  • DNS

4. Before ALTER CONNAME often:

  • STOP CHANNEL
  • DELETE QMGR
  • CLEAR all queues
  • Disable RACF
Published
Read time19 min
AuthorMainframeMaster
Verified: IBM MQ 9.4 documentation