Skip to content

Conversation

@dcorbacho
Copy link
Contributor

AMQP10 needs to handle the remote_income_window_exceeded error when an alarm is triggered.

Local shovels need to stop publishing and store the pending deliveries when an alarm is triggered. When all alarms are cleared, it must publish the pending deliveries.

When an alarm is set in the destination cluster, the AMQP10 shovel
receives a remote_incoming_window_exceeded error. It must handle
it and retry the send later on, until the alarm is cleared
Copy link
Collaborator

@michaelklishin michaelklishin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test failures are reproducible.

Local shovels must stop publishing when alarms are set in the destination
cluster. Messages are stored in memory and sent when the alarm clears,
the same way it is done for AMQP091
Copy link
Collaborator

@michaelklishin michaelklishin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record, since we depend on queue:len/1: modern Erlang/OTP's queue module still optimizes for memory footprint and queue:len/1 is an O(n) operation. It is documented right at the top of the module.

That's why RabbitMQ has had an alternative lqueue module since Sep 2011: it keeps the length around and makes queue:len/1 a constant time operation.

I will try switching these changes to use lqueue.

Copy link
Collaborator

@michaelklishin michaelklishin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's worry about module swapping in a separate PR.

@michaelklishin michaelklishin merged commit 497d74d into main Nov 3, 2025
289 checks passed
@michaelklishin michaelklishin deleted the shovel10-alarms branch November 3, 2025 19:11
michaelklishin added a commit that referenced this pull request Nov 3, 2025
Shovel bugfix: handle cluster alarms in AMQP10 and local shovels (backport #14873)
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.

4 participants