Queue service interval events examples

Use these examples to understand the information that you can obtain from queue service interval events

The three examples provide progressively more complex illustrations of the use of queue service interval events.

The figures accompanying the examples have the same structure:
  • Figure 1 is a graph of queue depth against time, showing individual MQGET calls and MQPUT calls.
  • The Commentary section shows a comparison of the time constraints. There are three time periods that you must consider:
    • The user-defined service interval.
    • The time measured by the service timer.
    • The time since event statistics were last reset (TimeSinceReset in the event data).
  • The Event statistics summary section shows which events are enabled at any instant and what events are generated.
The examples illustrate the following aspects of queue service interval events:
  • How the queue depth varies over time.
  • How the elapsed time as measured by the service timer compares with the service interval.
  • Which event is enabled.
  • Which events are generated.
Remember: Example 1 shows a simple case where the messages are intermittent and each message is removed from the queue before the next one arrives. From the event data, you know that the maximum number of messages on the queue was one. You can, therefore, work out how long each message was on the queue.

However, in the general case, where there is more than one message on the queue and the sequence of MQGET calls and MQPUT calls is not predictable, you cannot use queue service interval events to calculate how long an individual message remains on a queue. The TimeSinceReset parameter, which is returned in the event data, can include a proportion of time when there are no messages on the queue. Therefore any results you derive from these statistics are implicitly averaged to include these times.