Bird
0
0

You want to ensure a queue is mirrored on exactly two nodes but only if those nodes have a specific tag "db-server". Which policy configuration achieves this?

hard📝 Workflow Q8 of 15
RabbitMQ - Clustering
You want to ensure a queue is mirrored on exactly two nodes but only if those nodes have a specific tag "db-server". Which policy configuration achieves this?
Arabbitmqctl set_policy ha-tagged ".*" '{"ha-mode":"nodes", "ha-params":["db-server"]}'
Brabbitmqctl set_policy ha-tagged ".*" '{"ha-mode":"exactly", "ha-params":2, "ha-sync-mode":"automatic"}'
Crabbitmqctl set_policy ha-tagged ".*" '{"ha-mode":"all", "ha-params":["db-server"]}'
Drabbitmqctl set_policy ha-tagged ".*" '{"ha-mode":"nodes", "ha-params":["db-server-node1", "db-server-node2"]}'
Step-by-Step Solution
Solution:
  1. Step 1: Understand ha-mode "nodes"

    ha-mode "nodes" with ha-params listing specific node names mirrors the queue on exactly those nodes (leader on one, slaves on others).
  2. Step 2: Identify correct syntax for tagged nodes

    The command rabbitmqctl set_policy ha-tagged ".*" '{"ha-mode":"nodes", "ha-params":["db-server-node1", "db-server-node2"]}' lists exactly two nodes with names indicating the "db-server" tag.
  3. Final Answer:

    rabbitmqctl set_policy ha-tagged ".*" '{"ha-mode":"nodes", "ha-params":["db-server-node1", "db-server-node2"]}' -> Option D
  4. Quick Check:

    ha-mode nodes + ha-params node list = mirroring on exact nodes [OK]
Quick Trick: Use ha-mode "nodes" with ha-params listing node names with the tag [OK]
Common Mistakes:
MISTAKES
  • Using ha-mode "exactly" for node tag filtering
  • Passing node tags as ha-params for ha-mode "all"
  • Incorrect JSON syntax in policy command

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More RabbitMQ Quizzes