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?
ha-mode "nodes" with ha-params listing specific node names mirrors the queue on exactly those nodes (leader on one, slaves on others).
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.
Final Answer:
rabbitmqctl set_policy ha-tagged ".*" '{"ha-mode":"nodes", "ha-params":["db-server-node1", "db-server-node2"]}' -> Option D
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
Master "Clustering" in RabbitMQ
9 interactive learning modes - each teaches the same concept differently