Behaviours: sbroker_meter.
Sets an alarm when the process's message queue is slow for an interval.
sbroker_overload_meter
can be used as a sbroker_meter
in a sbroker
or
a sregulator
. It will set a SASL alarm_handler
alarm when the process's
message queue is slow for an interval and clear it once the message queue
becomes fast for an interval. Its argument, spec()
, is of the form:
#{alarm => Alarm :: any(), % default: {overload, self()} target => Target :: non_neg_integer(), % default: 100 interval => Interval :: pos_integer()}. % default: 1000
Alarm
is the alarm_handler
alarm that will be set/cleared by the meter
(defaults to {overload, self()}
). Target
is the target sojourn time of
the message queue in milliseconds (defaults to 100
). Interval
is the
interval in milliseconds (defaults to 1000
) that the message queue must be
above the target for the alarm to be set and below the target for the alarm
to be cleared. The description of the alarm is
{message_queue_slow, self()}
.
sbroker_queue
is congested. If a sbroker_queue
becomes congested it will drop requests to clear the congestion, causing a
congestion alarm (if one existed) to be cleared very quickly.
spec() = #{alarm => Alarm::any(), target => Target::non_neg_integer(), interval => Interval::pos_integer()}
Generated by EDoc