Skip to content

Conversation

@the-mikedavis
Copy link
Collaborator

The MQTT, WebMQTT and STOMP reader modules tracked whether they were blocked by any alarm, but they should instead keep a set of active alarms. Only tracking the Conserve part of the alarm notification from rabbit_alarm doesn't work correctly if a cluster enters and exits multiple alarms. For example if a cluster had both memory and disk alarms active and then cleared memory, these readers would unblock while they should remain blocked until both alarms are cleared.

Keeping a set of rabbit_alarm:resource_alarm_source()s matches the AMQP 0-9-1 and 1.0 readers. This change also updates the 0-9-1 reader to use map-based sets for the sake of consistency.

The MQTT, WebMQTT and STOMP reader modules tracked whether they were
blocked by any alarm, but they should instead keep a set of active
alarms. Only tracking the `Conserve` part of the alarm notification from
`rabbit_alarm` doesn't work correctly if a cluster enters and exits
multiple alarms. For example if a cluster had both memory and disk
alarms active and then cleared memory, these readers would unblock while
they should remain blocked until both alarms are cleared.

Keeping a set of `rabbit_alarm:resource_alarm_source()`s matches the
AMQP 0-9-1 and 1.0 readers. This change also updates the 0-9-1 reader
to use map-based `sets` for the sake of consistency.
@the-mikedavis the-mikedavis self-assigned this Oct 23, 2025
@michaelklishin
Copy link
Collaborator

Excellent catch. Thank you, @the-mikedavis.

@michaelklishin michaelklishin added this to the 4.3.0 milestone Oct 23, 2025
@michaelklishin michaelklishin merged commit 2f11122 into main Oct 23, 2025
576 of 577 checks passed
@michaelklishin michaelklishin deleted the md/multiple-alarms branch October 23, 2025 17:28
michaelklishin added a commit that referenced this pull request Oct 23, 2025
Handle multiple alarms consistently in protocol readers (backport #14795)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants