Queue service interval events
Queue service interval events indicate whether an operation was performed on a queue within a user-defined time interval called the service interval. Depending on your installation, we can use queue service interval events to monitor whether messages are being taken off queues quickly enough.
Queue service interval events are not supported on shared queues.
The following types of queue service interval events can occur, where the term get operation refers to an MQGET call or an activity that removes a messages from a queue, such as using the CLEAR QLOCAL command:
- Queue Service Interval OK
- Indicates that after one of the following operations:
a get operation was performed within a user-defined time period, known as the service interval.
- An MQPUT call
- A get operation that leaves a non-empty queue
Only a get operation can cause the Queue Service Interval OK event message. Queue Service Interval OK events are sometimes described as OK events.
- Queue Service Interval High
- Indicates that after one of the following operations:
a get operation was not performed within a user-defined service interval.
- An MQPUT call
- A get operation that leaves a non-empty queue
Either a get operation or an MQPUT call can cause the Queue Service Interval High event message. Queue Service Interval High events are sometimes described as High events.
To enable both Queue Service Interval OK and Queue Service Interval High events, set the QServiceIntervalEvent control attribute to High. Queue Service Interval OK events are automatically enabled when a Queue Service Interval High event is generated. You do not need to enable Queue Service Interval OK events independently.
OK and High events are mutually exclusive, so if one is enabled the other is disabled. However, both events can be simultaneously disabled.
Figure 1 shows a graph of queue depth against time. At time P1, an application issues an MQPUT, to put a message on the queue. At time G1, another application issues an MQGET to remove the message from the queue. The possible outcomes of queue service interval events are as follows:
- If the elapsed time between the put and the get is less than or equal to the service interval:
- A Queue Service Interval OK event is generated at time G1, if queue service interval events are enabled
- If the elapsed time between the put and get is greater than the service interval:
- A Queue Service Interval High event is generated at time G1, if queue service interval events are enabled.
The algorithm for starting the service timer and generating events is described in Rules for queue service interval events.