+

Search Tips | Advanced Search

Enabling queue depth events

To configure a queue for any of the queue depth events you set the appropriate queue manager and queue attributes.


About this task

By default, all queue depth events are disabled. When enabled, queue depth events are generated as follows:

Perform the following steps to configure a queue for any of the queue depth events:


Procedure

  1. Enable performance events on the queue manager, using the queue manager attribute PERFMEV. The events go to the SYSTEM.ADMIN.PERFM.EVENT queue.
  2. Set one of the following attributes to enable the event on the required queue:

    • QDepthHighEvent (QDPHIEV in MQSC)
    • QDepthLowEvent (QDPLOEV in MQSC)
    • QDepthMaxEvent (QDPMAXEV in MQSC)
  3. Optional: To set the limits, assign the following attributes, as a percentage of the maximum queue depth:

    • QDepthHighLimit (QDEPTHHI in MQSC)
    • QDepthLowLimit (QDEPTHLO in MQSC)
    Restriction: QDEPTHHI must not be less than QDEPTHLO.

    If QDEPTHHI equals QDEPTHLO an event message is generated every time the queue depth passes the value in either direction, because the high threshold is enabled when the queue depth is below the value and the low threshold is enabled when the depth is above the value.


Results

Note:

A Queue Depth Low event is not generated when expired messages are removed from a queue by a get operation causing the queue depth to be less than, or equal to, the value determined by the Queue Depth Low limit.

IBM MQ generates the low event message only during a successful get operation. Therefore, when the expired messages are removed from the queue, no queue depth low event message is generated.

Additionally, after the removal of these expired messages from the queue, queue depth high event and queue depth low event are not reset.


Example

To enable Queue Depth High events on the queue MYQUEUE with a limit set at 80%, use the following MQSC commands:

  ALTER QMGR PERFMEV(ENABLED)
  ALTER QLOCAL('MYQUEUE') QDEPTHHI(80) QDPHIEV(ENABLED)

To enable Queue Depth Low events on the queue MYQUEUE with a limit set at 20%, use the following MQSC commands:

  ALTER QMGR PERFMEV(ENABLED)
  ALTER QLOCAL('MYQUEUE') QDEPTHLO(20) QDPLOEV(ENABLED)

To enable Queue Full events on the queue MYQUEUE, use the following MQSC commands:

  ALTER QMGR PERFMEV(ENABLED)
  ALTER QLOCAL('MYQUEUE') QDPMAXEV(ENABLED)