This following sections describe how to set up the required objects to support triggering on WebSphere MQ.
An application queue is a local queue that is used by applications for messaging, through the MQI. Triggering requires a number of queue attributes to be defined on the application queue. Triggering itself is enabled by the TRGENBL attribute.
In this example, a trigger event is to be generated when there are 100 messages of priority 5 or higher on the local queue motor.insurance.queue, as follows:
CRTMQMQ MQMNAME(MYQUEUEMANAGER) QNAME('motor.insurance.queue') QTYPE(*LCL) PRCNAME('motor.insurance.quote.process') MAXMSGLEN(2000) DFTMSGPST(*YES) INITQNAME('motor.ins.init.queue') TRGENBL(*YES) TRGTYPE(*DEPTH) TRGDEPTH(100) TRGMSGPTY(5)
where the parameters are:
When a trigger event occurs, the queue manager puts a trigger message on the initiation queue specified in the application queue definition. Initiation queues have no special settings, but you can use the following definition of the local queue motor.ins.init.queue for guidance:
CRTMQMQ MQMNAME(MYQUEUEMANAGER) QNAME('motor.ins.init.queue') QTYPE(*LCL) GETENBL(*YES) SHARE(*NO) TRGTYPE(*NONE) MAXMSGL(2000) MAXDEPTH(1000)
Use the CRTMQMPRC command to create a process definition. A process definition associates an application queue with the application that is to process messages from the queue. This is done through the PRCDEFN attribute on the application queue motor.insurance.queue. The following command creates the required process, motor.insurance.quote.process, identified in this example:
CRTMQMPRC MQMNAME(MYQUEUEMANAGER) PRCNAME('motor.insurance.quote.process') TEXT('Insurance request message processing') APPTYPE(*OS400) APPID(MQTEST/TESTPROG) USRDATA('open, close, 235')
where the parameters are:
Use the DSPMQMPRC command to examine the results of your definition. For example:
MQMNAME(MYQUEUEMANAGER) DSPMQMPRC('motor.insurance.quote.process')
You can also use the CHGMQMPRC command to alter an existing process definition, and the DLTMQMPRC command to delete a process definition.
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
amqwag0236 |