Bird
0
0

You want to ensure a queue named task_queue is mirrored on at least 3 nodes but no more than 5 using a range specification in ha-params. Which policy configuration achieves this?

hard📝 Workflow Q15 of 15
RabbitMQ - Clustering
You want to ensure a queue named task_queue is mirrored on at least 3 nodes but no more than 5 using a range specification in ha-params. Which policy configuration achieves this?
Arabbitmqctl set_policy ha-range "^task_queue$" '{"ha-mode":"nodes","ha-params":["node1","node2","node3"]}'
Brabbitmqctl set_policy ha-minmax ".*" '{"ha-mode":"exactly","ha-params":3}'
Crabbitmqctl set_policy ha-minmax "^task_queue$" '{"ha-mode":"nodes","ha-params":["node1","node2","node3","node4","node5"]}'
Drabbitmqctl set_policy ha-minmax "^task_queue$" '{"ha-mode":"exactly","ha-params":"3-5"}'
Step-by-Step Solution
Solution:
  1. Step 1: Understand ha-mode 'exactly' with range ha-params

    ha-mode 'exactly' with ha-params as string like '3-5' dynamically mirrors the queue on a number of replicas between 3 and 5.
  2. Step 2: Identify correct command

    rabbitmqctl set_policy ha-minmax "^task_queue$" '{"ha-mode":"exactly","ha-params":"3-5"}' matches the queue exactly and uses range specification.
  3. Step 3: Check other options

    B uses fixed exactly 3 on all queues; C uses fixed nodes list of 5; D uses fixed nodes list of 3.
  4. Final Answer:

    rabbitmqctl set_policy ha-minmax "^task_queue$" '{"ha-mode":"exactly","ha-params":"3-5"}' -> Option D
  5. Quick Check:

    ha-mode exactly + ha-params "3-5" = dynamic range 3-5 [OK]
Quick Trick: Use ha-mode 'exactly' with ha-params "3-5" for range [OK]
Common Mistakes:
MISTAKES
  • Using 'exactly' with fixed integer instead of range string
  • Not matching queue name exactly
  • Using 'nodes' mode with fixed list instead of range

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More RabbitMQ Quizzes