Complete the code to declare a mirrored queue in RabbitMQ using policy.
rabbitmqctl set_policy [1] ".*" '{"ha-mode":"all"}'
The policy name can be any identifier. Here, mirror_all is used as the policy name to apply mirroring to all queues.
Complete the code to set the ha-mode to mirror all queues.
rabbitmqctl set_policy mirror_all ".*" '{"ha-mode":"[1]"}'
The ha-mode value all means the queue is mirrored on all nodes in the cluster.
Fix the error in the command to apply the mirroring policy correctly.
rabbitmqctl set_policy mirror_all ".*" '{"ha-mode": [1]'
The value for ha-mode must be a string enclosed in double quotes inside the JSON string.
Fill both blanks to declare a mirrored queue named 'task_queue' with ha-mode 'all'.
rabbitmqadmin declare queue name=[1] durable=true arguments='{"[2]":"all"}'
The queue name is task_queue. The argument key to set mirroring mode is ha-mode.
Fill all three blanks to create a policy named 'mirror_policy' that matches queues starting with 'task' and sets ha-mode to 'all'.
rabbitmqctl set_policy [1] "[2]" '{"[3]":"all"}'
The policy name is mirror_policy. The pattern to match queues starting with 'task' is ^task.*. The argument key is ha-mode.