rabbitmq / rabbitmq-server

Open source RabbitMQ: core server and tier 1 (built-in) plugins
https://www.rabbitmq.com/
Other
12.34k stars 3.92k forks source link

Quorum queues periodic policy repair #7863

Open kjnilsson opened 1 year ago

kjnilsson commented 1 year ago

Is your feature request related to a problem? Please describe.

If a quorum queue is unavailable when a policy is changed it may never apply the resulting configuration command and thus be out of sync with the matching policy. To handle this potential scenario we should do periodic checks to see if the active QQ configuration matches the policy it should have and if not issue another configuration change command.

Describe the solution you'd like

Quorum queues already do periodic repair type of work in rabbit_quorum_queue:handle_tick/3 so it would make sense to extend this function to also compare selected configuration fields with the currently active policy and process a new config command as is done when a policy changes. (see rabbit_quorum_queue:policy_changed/1)

Describe alternatives you've considered

Currently if this failure is even detected the only solution is to remove and re-add the policy for a given queue.

Additional context

VESC-1065

gomoripeti commented 2 months ago

We will look into implementing this one shortly