-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
Is your feature request related to a problem? Please describe.
Currently direct connections (amqp_direct_connection
) do not notice when publishers are blocked due to alarms like disk or memory usage. For an example:
mkdir /tmp/small-disk
sudo mount -t tmpfs -o size=3000M small-disk /tmp/small-disk
TEST_TMPDIR=/tmp/small-disk make run-broker
sbin/rabbitmqctl set_disk_free_limit 1000M
- Publish until the disk alarm is triggered (
perf-test -qq -u qq -x 1 -y 0
) sbin/rabbitmqctl set_parameter shovel my-shovel '{"src-protocol": "amqp091", "src-uri": "amqp://", "src-queue": "qq", "dest-protocol": "amqp091", "dest-uri": "amqp://", "dest-queue": "qq-copied"}'
The shovel can successfully move the messages from qq
to qq-copied
despite publishers being blocked. If the disk free limit is set low enough, moving the messages in a queue like this can fully exhaust disk space. It also probably works to shovel in messages from another instance for the same effect. As long as the destination connection is direct, publishing will not be blocked by alarms.
Describe the solution you'd like
Direct connections can register themselves with rabbit_alarm
and emit a #'connection.blocked'{}
when an alarm fires. rabbit_amqp091_shovel
then avoids sending messages to the destination (since #6224).
Describe alternatives you've considered
No response
Additional context
No response