Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
4.9.5. Queue Threshold Alerts (Edge-triggered)
In MRG 3, Queue Threshold alerts are edge-triggered. Thresholds are configured per-queue and are:
qpid.alert_count_up
- upper threshold (messages)qpid.alert_size_up
- upper threshold (bytes)qpid.alert_count_down
- lower threshold (messages)qpid.alert_size_down
- lower threshold (bytes)
By default, the upward threshold is set to the global threshold ratio multiplied by the maximum size/count of the queue. The global threshold ratio can be specified using the
--default-event-threshold-ratio
command line option, otherwise it defaults to 80%.
By default, the downward threshold is set to one half of the default upward threshold.
Note: The upper and lower thresholds should have a gap between them to limit event rates.
Events
There are two different events:
- Threshold crossed increasing
- The increasing event is raised when the queue depth goes from (
upper-threshold - 1
) toupper-threshold
and the increasing event flag is not already set. When an increasing event occurs the increasing event flag is set. The increasing event flag must be cleared (by a decreasing event) before further increasing events will be raised. This prevents multiple retriggering of this event by fluctuation of queue depth around the upper-threshold. - Threshold crossed decreasing
- The decreasing event is raised when the increasing event flag is set and the queue depth goes from (
lower-threshold + 1
) tolower-threshold
. The decreasing event clears the increasing event flag, allowing further increasing events to be triggered and preventing multiple retriggering of this event by fluctuation of queue depth around the lower-threshold.
The events are sent via the QMF framework. You can subscribe to the event messages by listening to the addresses:
qmf.default.topic/agent.ind.event.org_apache_qpid_broker.queueThresholdCrossedUpward.#
qmf.default.topic/agent.ind.event.org_apache_qpid_broker.queueThresholdCrossedDownward.#
Events are sent as map messages:
qmf::org::apache::qpid::broker::EventQueueThresholdCrossedUpward(name, count, size)
qmf::org::apache::qpid::broker::EventQueueThresholdCrossedDownward(name, count, size)
The following code demonstrates subscribing to and consuming threshold event messages:
Window One
- Python
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Window Two
- Python
Copy to Clipboard Copied! Toggle word wrap Toggle overflow