Initiation Queues

Initiation queues are the internal inbox for IBM MQ triggering. When a work queue with triggering enabled meets your rules—first message arrival, every message, or depth threshold—the queue manager does not call your application directly. It writes a trigger message to an initiation queue. The trigger monitor process reads that queue and starts the program named in the associated PROCESS definition. Beginners confuse initiation queues with application work queues; understanding the split is essential for batch mainframe jobs, triggered UNIX daemons, and any design that avoids polling empty queues. This page defines initiation queues, links them to INITQ and PROCESS, covers defaults and custom names, and walks through troubleshooting when triggers stop firing.

Initiation Queue Is a QLOCAL

Like transmission queues and dead letter queues, an initiation queue is defined with DEFINE QLOCAL and USAGE(NORMAL). There is no special USAGE value for “initiation”—the role comes from how the queue manager and trigger monitor use it. Typical attributes include MAXDEPTH sufficient for burst trigger events, DEFPSIST per your policy (trigger messages are usually short-lived), and authority limited so applications cannot PUT business data there. DISPLAY QLOCAL shows the queue; DISPLAY QSTATUS shows whether trigger messages are backing up.

The Triggering Flow

  1. Business application MQPUT to work queue ORDERS.IN (TRIGGER enabled).
  2. Queue manager evaluates TRIGTYPE, TRIGDPTH, TRIGMPRI, and related attributes.
  3. When conditions match, queue manager generates a trigger message on INITQ queue.
  4. Trigger monitor MQGETs trigger message from initiation queue.
  5. Monitor starts PROCESS(APPL.PROC) with trigger data (queue name, trigger type, etc.).
  6. Started application MQGETs business messages from ORDERS.IN.
Key triggering attributes on work queue
AttributeRole
TRIGGERENABLED / DISABLED / FIRST / EVERY / DEPTH
TRIGTYPEFIRST, EVERY, DEPTH, or NONE
TRIGDPTHDepth threshold when TRIGTYPE is DEPTH
INITQName of initiation queue for trigger msgs
PROCESSPROCESS object defining program to start
TRIGDATAUser data passed to started application

SYSTEM.DEFAULT.INITIATION.QUEUE

If INITQ is not specified on a triggered queue, many environments default to SYSTEM.DEFAULT.INITIATION.QUEUE. Verify it exists with DISPLAY QLOCAL. High-volume estates sometimes define INITQ per application family—PAYMENTS.INITQ, BATCH.INITQ—so one stuck trigger monitor backlog does not block unrelated systems. Each initiation queue needs exactly one active trigger monitor attention path per queue manager design; consult IBM documentation for multi-instance queue manager trigger behavior on your release.

Defining a Custom Initiation Queue

shell
1
2
3
4
5
6
7
8
9
10
11
12
13
DEFINE QLOCAL('PAYMENTS.INITQ') REPLACE + MAXDEPTH(10000) DEFPSIST(NO) + GET(ENABLED) PUT(ENABLED) + DESCR('Initiation queue - Payments triggers') DEFINE QLOCAL('PAYMENTS.IN') REPLACE + TRIGGER(FIRST) TRIGTYPE(FIRST) + INITQ('PAYMENTS.INITQ') + PROCESS('PAYPROC') + MAXDEPTH(500000) DEFPSIST(YES) DEFINE PROCESS('PAYPROC') REPLACE + APPLICID('payconsumer') USERDATA('region=eu') DISPLAY QLOCAL('PAYMENTS.IN') TRIGGER INITQ PROCESS DISPLAY QLOCAL('PAYMENTS.INITQ') CURDEPTH

TRIGGER(FIRST) with TRIGTYPE(FIRST) starts one instance when the queue goes from empty to having messages—classic batch wake-up. TRIGTYPE(DEPTH) with TRIGDPTH(100) can start additional workers when backlog grows. TRIGTYPE(EVERY) can start a process per message—dangerous at high rate; use only when startup cost is tiny and platform limits allow. PROCESS must exist and APPLICID must be executable by the queue manager service account on your OS.

Trigger Message Contents (Conceptual)

Trigger messages are special—they carry which queue triggered, trigger type, and optional trigger data from TRIGDATA on the queue or USERDATA on PROCESS. The started application uses this to open the correct work queue. Application code paths differ by language; mainframe COBOL samples often parse trigger parameters from the environment IBM provides on start. Read your platform programming guide for exact structure names and lengths.

Initiation Queue vs Work Queue

Compare initiation and work queues
AspectInitiation queueWork queue
Message sourceQueue manager (trigger)Applications
Message contentTrigger control dataBusiness payloads
ConsumerTrigger monitorYour application
Configured withDEFINE QLOCAL onlyTRIGGER, PROCESS, INITQ

Common Problems

  • Trigger monitor not running — no process starts; initiation queue depth may stay 0 while work queue fills.
  • Wrong PROCESS or APPLICID — trigger messages accumulate on initiation queue; check error logs.
  • TRIGGER(DISABLED) after ALTER — silent no-start until re-enabled.
  • Application puts to initiation queue — corrupts triggering; fix application design.
  • Insufficient authority for queue manager to start executable — platform-specific errors in AMQERR.

Initiation Queue vs JMS Listeners

Modern Java applications often use JMS Message Driven Beans or .NET listeners instead of classic MQ triggering. Conceptually both react to messages arriving without polling loops. Initiation queues remain important on z/OS and distributed batch where PROCESS triggering is entrenched. Architects choose triggering when they want the queue manager to spawn OS processes; listeners when the app server manages threads.

Explain Like I'm Five: Initiation Queue

The work queue is the pile of homework. When homework appears, a bell rings in the teacher's office (initiation queue). The teacher (trigger monitor) hears the bell and tells a helper (your program) to go grade the pile. You do not put homework in the teacher's bell box—that box is only for bell signals.

Practice Exercises

Exercise 1

List objects and attributes needed to trigger on first message to ORDERS.IN.

Exercise 2

Initiation queue CURDEPTH is high but work queue also has messages. Name three checks.

Exercise 3

When would you use a dedicated INITQ per application family?

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. Trigger messages are written to:

  • Initiation queue
  • Transmission queue
  • Topic tree
  • CCDT

2. Who reads the initiation queue?

  • Trigger monitor
  • Sender channel
  • LDAP
  • JCL

3. INITQ on QLOCAL specifies:

  • Which initiation queue gets trigger msgs
  • TLS cipher
  • Remote QM name
  • Log path

4. Default initiation queue name is often:

  • SYSTEM.DEFAULT.INITIATION.QUEUE
  • SYSTEM.DEAD.LETTER.QUEUE
  • SYSTEM.ADMIN
  • SYSTEM.AUTH
Published
Read time14 min
AuthorMainframeMaster
Verified: IBM MQ 9.3 documentation